Toolsettings Key-ins

The CadInputQueue.SendCommand and CadInputQueue.SendKeyin methods are easy ways for programmers to automate MicroStation tasks in their VBA macros.  One problem that users encounter is how to adjust the Tool settings for a particular command. As it turns out there is a key-in command that can help with that as well.

To find the Tool settings key-ins for an individual tool select the tool from the menu. In this example we are using Place Block. With the tool active open the Key-in window and enter the string: set item toolsettings but do not hit Enter. The available toolsettings key-ins for the active tool will be displayed in the far right list box. Those key-ins can be used in your macro with the SendKeyin method to ensure the toolsettings are configured correctly.

 

Place Block toolsettings
    With CadInputQueue
        'Start place block tool
        .SendCommand "place block icon"
        'set the block type to Orthogonal
        .SendKeyin "set item toolsettings placeblocktype=0"
        'set the area to Solid
        .SendKeyin "set item toolsettings elementarea=0"
        'set the fill type to Opaque
        .SendKeyin "set item toolsettings elementfill=1"

        'set the fill color to 3
        .SendKeyin "set item toolsettings elementfillcolor=3"
    End With

 

Rod Wing

Rod Wing

Rod is the Senior Systems Analyst at EnvisionCAD and has extensive experience in GIS, cartography, plotting, scanning, raster editing/manipulation, publishing, and file/data translations. He instructs MicroStation classes ranging from fundamentals to advanced.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *