cont'd...
We're going to create a Tool that when Clicked, will increment the Active Angle by 5° that is, if the current Active Angle is 45°, it will be bumped up to 50° (We could build one to
bump things by 1°, but that would be a bit tedious to use, 'eh?!)
We already know that we can't just employ a simple MicroStation key-in with a Scroller on it (like AA=+5) cause it just don't work, right?
What we're gonna do here is build a short Macro to do the job, and then we can tie that to our Tool.
The Macro, it turns out, is pretty simple it only has two lines...
MbeSettings.angle = MbeSettings.angle + 0.08726645
MbeSendKeyin "aa=$"
The first line sets the Active Angle (which is stored in MbeSettings.angle) to whatever it is plus 5° (5° converted to Radians, of course!)
The second line (aa=$) simply tells MicroStation to echo the current setting of the Active Angle in the Status field.
Create one of these guys in Notepad, and save it (I called this one IncrAngl.bas).
Then you can copy this file (I called mine DecrAngl.bas) and just change the plus sign to a minus, so it looks like this...
MbeSettings.angle = MbeSettings.angle - 0.08726645
MbeSendKeyin "aa=$"
You can also just use the MicroStation Macro editor to create these macros. In any case, you'll probably want to know where to save 'em that'd be, by default, in .../MSJ/Workspace/system/macros/.
OK now that we have our Macros, we need to hook some tools to 'em.
The Icons I've created are for Bumping the Angle up and taking it back down. (If you need a refresher on tool creation, check out our earlier article.)
I know my icons could use some work (give me a break... I'm in a hurry here!) but please do note the use of color to make it easier to grab one of these on the fly Blue for Incrementing, and Red for
Decrementing just like our Scrollers shown at the beginning of the article...
In fact, if you've built one of these Scrollers toolboxes, ya might just as well add the Angle Bumpers too!
Underneath the hood, the key-in doing the driving is pretty simple too...
This one's for the Incrementer, of course the other one just has the Decrementing macro's name specified (macro DecrAngl).
They work pretty cool! A couple of Clicks and you are throwing the Active Angle around like you own the place. To keep us honest, the newly bumped Angle is echoed in the Status Bar, just the way we specified in the macro (aa=$) a nice touch...
That's just about it. Hope you'll make some of these for yourself! Maybe even make some different increments, like 15°, 30°, or 45° well, you get the idea.
If you want to just download my 5° guys, hop on over to the Zone and pick 'em up!
Have fun! And don't forget to save your work!
See Ya...
Your Good Buddy,

Material excerpted (and Bubba-ized) from The Complete User Interface.
Article Copyright © 2002 Adage All rights reserved.
This material may not be published, rewritten, or redistributed.