Keyin to change the selected text to certain angle

Hello, I'm looking a way by using key-in(s) to change the angle of multiple selected text to 0° or any other angle defined by me.

I know about program ActiveAngleAssistant, I'm interested in key-in(s).

MicroStation V8i (SS3) 08.11.09.292

 

Parents Reply
  • Just recorded a macro:

    ! selected any text angle 56° => toggled element info dialog window => changed element geometry angle to 0°
    As you may see in the code below, no useful keyins captured :)

    Sub Macro1()
        Dim startPoint As Point3d
        Dim point As Point3d, point2 As Point3d
        Dim lngTemp As Long
    
    '   Coordinates are in master units
        startPoint.X = 150114.013039893
        startPoint.Y = 208916.416886794
        startPoint.Z = 1.3271346688E-10
    
    '   Send a data point to the current command
        point.X = startPoint.X
        point.Y = startPoint.Y
        point.Z = startPoint.Z
        CadInputQueue.SendDataPoint point, 1
    
    '   Start a command
        CadInputQueue.SendCommand "MDL KEYIN elementinfo element info dialog toggle"
    
        CommandState.StartDefaultCommand
    End Sub

Children
  • If there's no command that equals "change this property of an element" (which there may not be) you may not be able to achieve what you want.

    That being said, you may be able to leverage one of the ActiveAngleAssistant macros through the keyin to load and run the macro that will rotate text to 0 (or to active angle which you can set to 0). You may be able to create your selection set, load/run the macro, and if it needs to, send a data point to accept, then "choose none".

    I am not in Microstation today, so I can't look those up directly.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

  • If you have some VBA programming experience you can start with the following sample code in the VBA help.

    Open the VBA help file “MicroStationVBA.chm” from the following location
    C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\MicroStationVBA.chm

    Search for a sample code "Rotating an Element Example"