Home Search

DriveWorks Pro 22
Run Macro

Send Feedback

Run Macro

The Run Macro task will run a macro in the specification.

Macros cannot be run while editing a project.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
Macro NameThe name of the macro in the project.
Macro Argument

Provides an optional argument to the macro.

Click here for more information...
DeferFalse (default) to run the macro immediately.

True (not recommended) to defer the execution of the macro until after the Specification has been saved.

Using TRUE for the Defer property

  • Setting the property to TRUE is not supported when triggered from a Macro Button control.
  • Setting the property to TRUE is only supported when applied to the Leave Event of a State that transitions to a Paused State.
  • Setting the property to TRUE and running other Tasks within the same Specification Macro is not supported.

When a Specification is created a copy of the Project file (.driveprojx file) is stored alongside it in a hidden folder. This file is saved whenever a Specification is transitioned to a non-running state.

The Defer property controls the timing of when the macro is run.

  • FALSE - executes the macro immediately
  • TRUE - defers the execution until all other Tasks have been run.

When a Specification transitions to a paused state, and the Defer property is set to TRUE, it will run after all other Tasks within the same Task Sequence have been run and all the changed values have been saved to the Project file.

Examples

When this task is added the properties are static 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
DeferFalseFalseSetting this to False will run the Macro immediately
Macro Argument"mm|Inch"mm|InchThis value/list can be used via the DWCurrentMacroArgument Special Variable in other Rules
Macro NameSetUnitsSetUnitsThis is the name of the Specification Macro that this Task will run.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • Macro was successfully executed.

Success with Warnings

  • N/A

Failed

  • Macro failed to succesfully execute - see the Specification report for more information.