Macros and Executables
A macro is a saved set of drawing actions that can be used later as a single command.
Menu: Tools / Macro Record
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:
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.
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. *
Menu: Tools / Stop Recording
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.
Menu: Tools / Continue Recording
After stopping or pausing a macro recording, choose the Continue Recording command. The macro resumes recording.
Menu: Tools / Pause Recording
While recording a macro, choose the Pause Recording command. The macro stops recording until you choose the Continue Recording command.
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.
Menu: Tools / Macro Toolbox
This command is a toggle command that either displays or hides the Macro Toolbox
Menu: Tools / Macro Execute
Shortcut Key: %
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
Menu: Tools / Stop Macro
Shortcut Key: &
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.
Menu: Tools / Command History
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.
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.
Menu: Tools / Run Executable
Lets you run an executable from within DesignCAD.
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.