Overview of Macro Features
Macro features are application-defined features that users can add to
a SolidWorks model. The effect of a macro feature on the model is defined
by programs that you, or a third-party, develop.
Macro features use one of two techniques to specify their intended behavior.
They can be associated either with functions:
The functions define the macro feature.
Macro feature function |
VBA |
COM |
Comment |
Edit definition |
Required |
Required |
Called whenever the user edits the macro feature's definition. |
Rebuild |
Required |
Required |
Called whenever the macro feature rebuilds. |
Security |
Optional |
Required |
Allows you to specify whether instances of the macro feature can be
edited, suppressed, or deleted from the model. |
The names of the VBA macro feature functions must begin with swm.
For example, you could name the functions
swmEdit, swmRebuild, and
swmSecurity.
Users must be able to run the program that creates the macro feature
whenever they want to add one to a model.
The IMacroFeatureData Interface
supports macro features.