SolidWorks API (Add-in vs. Stand-Alone App)
SolidWorks API (Add-in vs. Stand-Alone App)
(OP)
Hi Folks,
This is a somewhat subjective question but I'm interested in hearing from some of the API junkies here. My question is simple:
What are your feelings about coding and implementing a SolidWorks Add-in over a stand-alone application and vice versa? When do you decide that going this route is better than using the macro approach?
I am doing a presentation about SolidWorks automation and have pretty well covered the topic of macros. I want to put in a couple of slides about Add-ins and stand-alone programs that use the SolidWorks API just to make mention of these options but I've developed a case of writer's block.
Obvioulsy we can do quite a bit with macros but I have enough on that subject so if we could please stick to the question of when we DON'T use macros that would be great.
Thanks!
This is a somewhat subjective question but I'm interested in hearing from some of the API junkies here. My question is simple:
What are your feelings about coding and implementing a SolidWorks Add-in over a stand-alone application and vice versa? When do you decide that going this route is better than using the macro approach?
I am doing a presentation about SolidWorks automation and have pretty well covered the topic of macros. I want to put in a couple of slides about Add-ins and stand-alone programs that use the SolidWorks API just to make mention of these options but I've developed a case of writer's block.
Obvioulsy we can do quite a bit with macros but I have enough on that subject so if we could please stick to the question of when we DON'T use macros that would be great.
Thanks!
Chris Gervais
Application Engineer
CSWP, CSWST






RE: SolidWorks API (Add-in vs. Stand-Alone App)
Macros and Stand-alone applications can handle events, but they require more setup and must be ran either manually or with a special SolidWorks startup routine. And if using macro's to do this, stability has been known to be an issue. Add-Ins on the other hand automatically load when starting SW, and are very stable.
Ken
RE: SolidWorks API (Add-in vs. Stand-Alone App)
[ul]
[li]Monitoring for events is more robust (though technically still possible with macros and .exe's if they are running at the time).
For either addins or stand-alone, compiled code runs faster. I have not noticed a difference in speed between the two.
RE: SolidWorks API (Add-in vs. Stand-Alone App)
Regards,
Regg
RE: SolidWorks API (Add-in vs. Stand-Alone App)
Thanks for the input but it's not quite what I was after. Let me try rephrasing the question differently.
Can anyone give me examples where they were looking at programming some specific task and came to a decision that the best way to accomplish what they wanted to do was to go the Add-in/Stand-alone application route?
Like I said in my initial post, I am looking for a little help on a presentation about the SolidWorks API. The intended audience is going to consist primarily of novices. What I really want to accomplish is to give people an idea about when/where/why people decide that a macro is not the way to go by citing some examples (real-world or hypothetical).
Thanks,
Chris Gervais
Application Engineer
CSWP, CSWST
RE: SolidWorks API (Add-in vs. Stand-Alone App)
1. Customer wanted toolbars
2. Customer needed program to issue warning when certain drawing views were created (requires API events to monitor active doc type and view creation).
3. Customer wanted external references report on screen whenever assembly or drawing opened (requires API events tom monitor when dwg or assembly opened).
http://www.EsoxRepublic.com-SolidWorks API VB programming help
RE: SolidWorks API (Add-in vs. Stand-Alone App)
-accomdate event handlers i.e. when SW opens a document, do this
-"integrate" the task you want to perform in to existing SolidWorks UI - i.e. property manager pages, menus
Anything you can do in a standalone app/macro you can do in an Add-in, but a standalone app/macro is easier to develop. You also need full VB (.Net or VB6) or C++ to develop an add-in or standalone app - you can develop a macro with SolidWorks VBA.
RE: SolidWorks API (Add-in vs. Stand-Alone App)
I thought it was possible to create Property Manager Pages with macros? I'm pretty sure I saw an example somewhere.
Ken
RE: SolidWorks API (Add-in vs. Stand-Alone App)
You remember correctly.
I have the sample code around here somewhere.
Remember...![[idea] idea](https://www.tipmaster.com/images/idea.gif)
"If you don't use your head,
your going to have to use your feet."