Edit Definition Function
The edit definition function for a macro feature:
The edit definition function is called by SolidWorks whenever the user
edits the definition of a macro feature. This function should handle all
user-interface activity needed for acquiring and editing selections and
parametric data for the macro feature. The IPropertyManagerPage2
interface is well suited for handling the user interaction, but it is
not required. Other user interface options are VBA UserForm or an external
application.
The data should be stored using the macro feature’s IMacroFeatureData
interface. User inputs should be validated and body operations checked
before calling IFeature::ModifyDefinition
or IFeature::IModifyDefinition2,
which causes the macro feature rebuild
function to be called.
The following example illustrates an VBA-based edit definition function.
Function swmEdit(app As Variant, part As
Variant, feature As Variant) As Variant
msgbox "Edit definition function called."
.
.
.
swmEdit= True
End Function