Home Search

DriveWorks Pro 21
Run SOLIDWORKS Macro

Send Feedback

Run SOLIDWORKS Macro

The Run SOLIDWORKS Macro Generation Task will run a SOLIDWORKS Macro.

Properties

Property NameDescription
(Name)The unique name for this task.
Macro File PathThe absolute path to the SOLIDWORKS macro file, including the .swp file extension.
Module NameThe name of the module in the Macro file to run.
Sub RoutineThe name of the sub routine in the specified module to run (default is Main).

Example

When this task is added the properties are both static and dynamic by default.
See How To: Change A Static Property To A Dynamic Property to enable rules to be built on these properties.

Property NameExample RuleExample ResultMeaning
Macro File Path"D:\SOLIDWORKSMacros\Chamfer.swp"D:\SOLIDWORKSMacros\Chamfer.swpWill run the macro Chamfer.swp that exists in the folder D:\SOLIDWORKSMacros.
Module NameDriveWorksDriveWorksWill run the sub-routine from the module DriveWorks.
Sub RoutineMainMainWill run the sub-routine Main.

Please see How To Create A Macro To Run On A SOLIDWORKS File for information on SOLIDWORKS Macros.

Generation Sequence

This Task can be added to the following Generation Sequence(s):

  • Pre Drive (will be run before the Main Drive Sequence)
  • Post Drive (will be run after the Main Drive Sequence)
  • Pre Close (will be run before the SOLIDWORKS file is closed)