Extensible CAD Technologies
SolidWorks and PDMWorks Enterprise Development Blog

SolidWorks API

SolidWorks API Presentation – Beginner’s Guide To The API

Posted by at 17 December, 2008, 1:40 pm
1

From time to time I do presentations on the SolidWorks API and one that gets requested fairly often is the Beginner’s Guide To The API.  I just presented this in Roanoke, VA at the Blue Ridge SolidWorks User’s Group headed up by Jeremy Marks.  They were a good bunch of guys (although there was a University of North Carolina fan in attendance) and it seems like a well-run group.  However, after risking my life to get there by driving through what seemed the rain-storm of the century on unfamiliar mountain highways with almost no visibility I have decided that in the future it might be safer for me to simply make the presentation available on my blog : )

beginners-guide-to-the-api

Also, the SolidWorks Autonumbering Macro (w/ MS Access Database) that I usually show has been written up for ConnectPress with a link to download the Macro and Database.  You can view that article here:

http://www.solidworkscommunity.com/feature_full.php?cpfeatureid=32314

If you enjoyed this post, make sure you subscribe to my RSS feed!

Category : CAD | Macros | SolidWorks | SolidWorks API

Setting Up and Troubleshooting Your SolidWorks Add-in Development Environment. Take off, eh…

Posted by at 12 June, 2008, 1:31 am
10

 

Writing Add-ins in SolidWorks can be tricky stuff as it involves class libraries, COM, interfaces, etc…  It can be argued whether it is easier or harder in .NET (ease of use of .NET versus pain in the rear of COM Interop) but your good friends at SolidWorks set out to make it easy on all of us by creating Visual Studio templates for quickly creating SolidWorks Add-ins.  continue

If you enjoyed this post, make sure you subscribe to my RSS feed!

Category : .NET | COM | SolidWorks | SolidWorks API

Free SolidWorks Add-In To Remind You To Eat Your Custom Properties

Posted by at 23 February, 2008, 10:50 pm
14

 In spite of all their positive benefits, which are many, more than a few SolidWorks users look upon custom properties with the same disdain that a pre-schooler would have for green leafy vegetables.  You can explain the benefits of custom properties, how they help you find things, how they lead to healthy drawing title blocks, how they improve PDM implementations, etc… until you are blue in the face and with some individuals you still won’t make a dent.  There might be a change for a few days even a few weeks but inevitably you are back to files with no custom properties filled out. 

In order to increase the life-expectancy of CAD administrators everywhere, I have posted a free .NET Add-In for SolidWorks that will “remind” your users to enter certain custom properties whenever they create a new file or save an existing one (after the initial save).  The list of custom properties is configurable and

  continue

If you enjoyed this post, make sure you subscribe to my RSS feed!

Category : .NET | CAD | COM | SolidWorks | SolidWorks API | XML

Macros 301 – Generate Document Numbers From MS Access Database And Auto Insert Them Into New Documents

Posted by at 9 February, 2008, 12:04 am
7

Father forgive me.  It has been two weeks since my last blog post.  I apologize everyone for the long interval but things have been crazy.  In addition to some long nights at my day job, I am in the process of releasing a new version of InspectionXpert, the Quality Inspection Sheet generating software from my company Extensible CAD.  It is a rewarding endeavor but also very demanding.

 Anyways… not so long ago I posted a Macro & tutorial on how to register for SolidWorks events.  One application of that technique that I mentioned was to automatically generate document numbers for your SolidWorks document and insert them into SolidWorks “auto-magically.”  Well, not too long thereafter I was bombarded with emails asking me to post that little Macro and I promised to do so.  This post is the fullfillment of that promise.  I’m sorry it took so long but I think you guys will like it.  I feel it is “auto-magically delicious” myself : )

 You can download the database and the macro from here.

Keep reading to see a flash video of the macro in action…

continue

If you enjoyed this post, make sure you subscribe to my RSS feed!

Category : Database | SolidWorks | SolidWorks API

How To Destroy References To SolidWorks From Managed Code

Posted by at 20 December, 2007, 10:48 am
0

 

Memory management in the COM world is a lot more straightforward in the COM world than it is in the .NET world.  Destroying COM references from .NET applications typically includes trial and error, calls to mysterious APIs, prayer and in the end, frustration.  It always reminds me of tying to kill a vampire, werewolf or some other bloodsucking, mythical creature that just won’t die.  It is because of this that my heart warmed with joy when I saw that some kind soul over at SolidWorks wrote a post to once and for all clarify how to destroy references to SolidWorks’  COM objects.

Tech Tip From SolidWorks On Destroying References To Unmanaged (i.e. COM) Components

 We have all heard about the promised land of .NET where you don’t have to worry about memory management.  The garbage collector handles all of the memory management for you.  You just instantiate your objects, use them and then forget them.  Santa Clause The .NET Garbage Collector determines when the objects are no longer needed and then destroys them and reallocates the memory.  Anyone who does API programming with SolidWorks in .NET either knows or should know that this is not the case for unmanaged (i.e.  COM) components (e.g. the SolidWorks class library used for interfacing with SolidWorks).  Some CAD systems (e.g. Unigraphics) have implemented a .NET API interface but SolidWorks still uses a COM  API interface.  This means that SolidWorks API developers using .NET must destroy SolidWorks objects “they d@mn self.” 

And remember…

…Even a man who is pure in heart
and says his prayers by night
may become a wolf when the wolfbane blooms
and the autumn moon is bright.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Category : .NET | SolidWorks API
Generate First-Article Inspection Reports From TIF, PDF and CAD Drawing Files With InspectionXpert. Generate First-Article Inspection Reports From SolidWorks Drawing Files With InspectionXpert.