Because so many SolidWorks API users appear to use either VBA or Visual Basic 6.0 as their primary development environment, I thought a post about upgrading to .NET might be in order. There are endless possibilities for a topic even within that category but I feel that there are so many misconceptions about Visual Basic.NET amongst SolidWorks API users that it makes the most sense to use my little bit of time and real estate here to undo some of those misconceptions. Those who do SolidWorks API development for their actual job should already know these but individuals who perform SolidWorks customization through the API as their “secondary job” or as a hobby might benefit from the post.
If you enjoyed this post, make sure you subscribe to my RSS feed!
What Does This Addin Do?
This Addin “listens” for Command Button events to be “fired” from data cards in PDMWorks Enterprise. This could be File Cards (i.e. for existing files or folders) or Input Cards (i.e. for new files or folders). If the command string of the Command Button matches our criteria, then the Addin will pull the next Serial Number from a Serial Number sequence in the vault. The best thing about the Addin is that the Serial Number sequence name is specified as part of the command string. This means that the Addin can be configured very easily by a non-programmer to run on any number of different Serial Number sequences. In other words, our Addin is Extensible (sorry, I couldn’t resist).
Why Do I Need A Custom PDMWorks Enterprise Addin For Handling Document Numbers When PDMWorks Enterprise Already Has “Serial Numbers” Functionality That Handles This?
PDMWorks Enterprise is a great tool and the Serial Numbers functionality is very useful. However, as implemented in PDMWorks Enterprise, the Serial Numbers are kind of wired directly in to the system and don’t allow much flexibility in terms of when and how they are used. You either set your part number to be populated from the Serial Number sequence or you don’t. There is no “let’s do it this way for this case and another way for this other case.” By writing a very simple Addin, continue
If you enjoyed this post, make sure you subscribe to my RSS feed!
Why Should I Learn How To Register My Macros To Register For Notifications From SolidWorks?
The common Macros that you see floating around the SolidWorks community are many and most of them are useful. However, most of those Macros run only when explicitly commanded to do so by the user. This is great for most Macros but there are times when it is nice to have some of your code run every time a certain event happens in SolidWorks. For example, what if you want to have SolidWorks filenames determined based on your company’s part-numbering scheme, which is pulled from a database? Wouldn’t it be nice to have the situation where every time SolidWorks prompts you to save a file, the filename box was pre-populated with the next number in the sequence?
You might be thinking, why not just continue
If you enjoyed this post, make sure you subscribe to my RSS feed!