CAD Extension Events

List of CAD Events, when they are executed, and the CAD API Objects available to them.

Events

Event Description CAD API Object Argument
OnStart
Run when the CAD build starts. No files have been opened. Used to get the Solidworks application object if required and to set user preference toggles. Pointer to CAD application object
OnEnd

Run when the CAD build and all it's outputs are complete.

N/A
OnLoadMainComponent
Run when the template file of the Solidworks output is initially opened. ModelDoc2
OnCloseMainComponent
Run when processing of the template file of the Solidworks output is completed but before the final save or SaveAs outputs are created. This is the recommend place to modify the template model through the API. ModelDoc2
OnModifyComponent
Run when any component of an assembly is modified. Component2
OnModifyDynComponent
Run when a dynamic component is added to an assembly. Component2
OnModifyDimension
Run when a dimension is modified. Dimension; DisplayDimension
OnModifyFeature
Run when a feature is modified. Feature
OnModifyLibFeature
Run when a library feature is modified. Feature
OnOpenDrawing
Run when a drawing output is opened for processing. ModelDoc2; DrawingPath
OnCloseDrawing Run after a drawing output is processed but before the final save or any SaveAs outputs are generated. This is the recommended event to make changes to the drawing through the API. ModelDoc2; DrawingPath
OnSaveComponent Run each time a component is saved. Component2

 

Was this article helpful?