Using the Macro Recorder to Capture Commands
The MicroStation VBA Macro Recorder is a useful tool beyond just capturing workflows for creating your own macros. A common dilemma for users wanting to create Batch Process scripts, or their own custom toolboxes is knowing the key-in commands they need for the task they want to accomplish. Using the Macro Recorder to capture the necessary commands in a vba macro can provide the key-in entries required for both applications. The command in double quotes after the CadInputQueue.SendCommand statement can be copied and pasted into a Batch Processor script, or used for the Key-in entry for a custom toolbox button.
Sample MicroStation commands captured using the VBA Macro Recorder
Dim startPoint As Point3d
Dim point As Point3d, point2 As Point3d
Dim lngTemp As Long
‘ Start a command
CadInputQueue.SendCommand “CHOOSE ALL”
CadInputQueue.SendCommand “CHOOSE NONE”
CadInputQueue.SendCommand “PLACE DIALOGTEXT ICON”
Copy and pasting a command into a Batch Process script file
Copying a command key-in to create a custom toolbox button.
One Response to “Using the Macro Recorder to Capture Commands”
Envision Newsletter October 2011 | Envision CAD | MicroStation Training & InRoads Training Says:
[…] VBA: Using the Macro Recorder to Capture Commands […]