I used to have a cell placement tool that when i picked a cell, i could right click and it would rotate 90, then 90 again. I can't figure out how to do this in the button assignments. Does anybody know an easy way to do this? or an easy key in that will allow something like active angle=90+90+90, etc
Hallo
Look here
communities.bentley.com/.../active-angle-assistant-macro-updated
Cole DeBolt said:I’m just looking for a key in that will rotate the active angle 90 and repeat
Try this MicroStation key-in for CONNECT:
macro vba execute ActiveSettings.Angle = ActiveSettings.Angle + Pi / 4
Try this MicroStation key-in for V8:
vba execute ActiveSettings.Angle = ActiveSettings.Angle + Pi / 4
Regards, Jon Summers LA Solutions
I get "unable to execute statement, end of statement"
Cole DeBolt said:I get "unable to execute statement, end of statement"
What is the exact version no. (e.g. v10.x.y.z) of MicroStation that you are using? Use key-in VERSION to see the version no. in the MicroStation Message Center, or Help→About MicroStation in the backstage.
VERSION
See this blog that shows you how to obtain MicroStation's version number.
This is the result I see with MicroStation CONNECT Update 16.2...
Cole DeBolt said:Microstation V8i
Here's the VBA procedure I used to check the arithmetic...
Private Sub TestActiveAngle() Dim aa As Double aa = ActiveSettings.Angle Debug.Print "Active Angle=" & CStr(Degrees(aa)) ActiveSettings.Angle = ActiveSettings.Angle + Pi / 4 aa = ActiveSettings.Angle Debug.Print "Active Angle=" & CStr(Degrees(aa)) End Sub
For MicroStation V8, the key-in should be the second one I posted previously.
I think you meant to write Pi/2
Cole DeBolt said:Couldn’t get the original one to work in the key in though
I no longer have V8 installed so I can't test the key-in with that version of MicroStation. Perhaps Barry Lothian can try it — I believe that he's using V8.
Alternatively, consult the V8 VBA help doc to find the correct syntax. Search for MicroStation VBA Key-ins, and scroll to see To execute a VBA statement with a key-in.