Hi everybody,
I wrote a simple macro to merge all solid bodies present in a part, I would like to include it in the model tree, so that it is executed exactly after certain features and before others. I cannot find the "Macrofeature" entry in any menu.
Thank you very much for your help
SolidworksApi macros
Here are a couple articles from the API Help that I hope you find useful:
2017 SOLIDWORKS API Help - Creating Macro Features
2017 SOLIDWORKS API Help - Inserting Macro Features
IFeatureManager::InsertMacroFeature3
This can be A Embeded macro file that Is written in VBA
or a COMServer based one that is controlled by an addin.
MacroFeatures are the most powerful thing in solidworks in my opinion.
since you are using macros currently you will want to use the VBA method
start with this macrofeature code
its a pain to get started with for the first time so ask questions as you start to develop this.
use the above template for formatting purposes.
Thank you everyone for the suggestions.I will try it out.
I could manage to do it.
This document is very useful, especially the empty macrofeature code.
It contains also a very helpful presentation about Macrofeatures