Skip to content

Macros and Executables

A macro is a saved set of drawing actions that can be used later as a single command.

Macro Record

Menu: Tools / Macro Record

img

Records a macro that can be used later as a single command.

When you use the Macro Record command, you are first asked for the macro name. (The Set Initial Reference Point option is the same as the Record Starting Point option which is described below.) Select a name and a location for the macro in the Record Macro box and click Save. Then the Macro Record toolbox appears on the screen:

img

The icons represent Record / Continue, Pause, Macro Options, and Stop.

The Macro Options icon opens a window in which you can set different options for the macro.

img

Record Starting Point: Determines whether or not a starting point is used for the macro. If this option is enabled, a starting point is required at the beginning of the recording and when the macro is executed. The entities drawn during the recording and execution of the macro will have identical spatial relationships with their starting points.

If this option is disabled, no starting point is required during the recording or subsequent executions of the macro. The entities drawn during the execution of the macro will be located at the same drawing coordinates as when they were recorded.

Record Layer: Checking this box causes the macro to run in the same layer in which it was created.

Record Command Parameters: Checking this box saves option information in the macro. For example, if you create a sphere with this option enabled, the macro will retain information such as number of latitudinal and longitudinal facets, and whether you created it in Vertex, Pole, or Midpoint format. If you leaved this option disabled, then you will be asked for that information each time you run the macro.

Record Points: The points set in specific drawing commands will be retained in the macro.

Record Color: Creates all objects in the same colors in which they were recorded.

Record Line Style: Record the drawing’s current line style with the macro.

After you enter the macro name, everything you draw on the screen becomes part of the macro. You can pause recording by clicking on the Pause button, and resume by clicking on the Record button.

When you are finished recording your macro, click the Stop icon or choose Stop Recording from the Tools menu. The macro can then be run using the Macro Execute command.

Example: Draw a box and a sphere of specific sizes in several drawings.

Select the Macro Record command. Make sure the Set Initial Reference Point option is enabled. Name the macro TEST.D3M and click Save. Set a starting point. Draw a box and a sphere on the screen. Click the Stop icon. The macro will be saved under the selected file name. Then, select the Macro Execute command and choose TEST.

D3M from the window. Set a starting point for the macro and DesignCAD will carry out the recorded series of actions.

TIP: You can assign Toolbox buttons to the macros you create.

Stop Recording

Menu: Tools / Stop Recording

img

After you have finished recording a macro, choose Stop Recording. The macro will be saved under the file name entered in the Macro Record command.

Continue Recording

Menu: Tools / Continue Recording

img

After stopping or pausing a macro recording, choose the Continue Recording command. The macro resumes recording.

Pause Recording

Menu: Tools / Pause Recording

img

While recording a macro, choose the Pause Recording command. The macro stops recording until you choose the Continue Recording command.

Record Options

Menu: Tools / Record Options

The Record Options command can be activated while the macro is being recorded. This command allows you to save and change options within the macro.

Macro Toolbox

Menu: Tools / Macro Toolbox

This command is a toggle command that either displays or hides the Macro Toolbox

img

Macro Execute

Menu: Tools / Macro Execute

Shortcut Key: %

img

Runs a DesignCAD macro. A macro is a saved set of drawing actions that can be used later as a single command.

Choose the Macro Execute command, enter the macro name when asked for it, and click Open. Set a starting point for the macro if required. The macro begins its execution.

Example: Draw a box and a sphere of specific sizes in

Stop Macro

Menu: Tools / Stop Macro

Shortcut Key: &

img

Stops the execution of a DesignCAD macro. However, you cannot access the Command Menu or the shortcut key to stop the macro if a drawing or shading or similar command is in operation.

Command History

Menu: Tools / Command History

img

Lists the commands that have been used in the current drawing session, starting with the most recent. Commands in the list may be executed using the Command History window.

img

Choose a command from the list by clicking on it with the mouse. Click Execute to start the command.

To return to the DesignCAD drawing screen without starting a command, click Cancel.

To clear the command history, click Clear.

Run Executable

Menu: Tools / Run Executable

img

From the Run Add-On window, select or enter the name of the file and its location. When you have supplied the information, click the Open button. The executable initializes.To stop an executable, select the program’s Exit command.