He divides his time between developing innovative custom software solutions and helping clients navigate complex design automation environments. With just a little bit of effort you can optimize your workflows and create a more productive CAD environment.Ībout Mark Stefanchuk: Mark is a VP and senior consultant with CAD Management Resources, Inc.
Run this keyin from the keyin browser, add an icon to the Change Attributes toolbox and maybe create a new task. But, we also want to make sure tha the Match Element Attributes command has been started. To run the vba you can use the keyin, vba run Macro1. Instead of Macro1() you could replace that with MatchChkAll() and for Macro2() maybe this could be MatchChkNone(). If you want a different name for a macro, just change the sub name. This new macro will uncheck all of the boxes. Or, copy and paste Macro1 (change the new sub name to Macro2). Repeat these steps but uncheck the boxes. This command will stop the match command and select your default command (usually smart selector). Remove the second last line too, CommandStatement.StartDefaultCommand. You can remove all of the Dim statements because these are not used.
The visual basic editor will contain the macro you just recorded. Open the Visual Basic Editor (icon that looks like a dialog box – to the right of the triangle). Now, click the stop button (white square) in the Project Manager dialog. To record, highlight the Default VBA and then click the red button in the Project Manager dialog. The settings dialog changes to show the Match Element Attribute controls. You can select the command from the Task menu, or type the keyin “match icon”. To record the macro, open the VBA Project Manager dialog – Utilities | Macro | Project Manager.īefore we record the check boxes we need to start the Match command. I like the idea of adding a couple of extra commands in my tasks menu, but adding new icons to the toolbox or pull down menu can work too. You can then add these new commands to your MicroStation menus. It’s easy enough to record the action of checking these boxes (and unchecking the boxes). VBA of course is just as easy – as we will see in a moment.ĭo we still need a macro like this one? If you want all options on, or all off then there may still be room in your toolbox for this macro. In MicroStation V8i these settings are saved, so you only have to check the boxes one time. The basic macro (before VBA) was really simple and you could record it using the record macro dialog. At the time, MicroStation J did not save these settings, so every time you used the command you would have to check the boxes for the element attributes you wanted to change. Many years ago I created a MicroStation basic macro that would check the boxes of the match element command.