V8i View Attributes Settings Macro for 2D Design Files

This macro will change the View Attributes settings for a 2D design file.
Copy and paste into your text editor, modify as needed.

'====================================================
'   Created by Carl Kastner
'   20180913
'   MicroStation V8i SS4 | Win 7
'====================================================

' Turns off/on (False/True) attributes on the View Attributes dialog.

Sub main
    Dim startPoint As MbePoint
    Dim point As MbePoint, point2 As MbePoint

'   Send a keyin that can be a command string
    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 ACSTriad True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Background False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 BoundaryDisplay False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 ClipVolume True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Constructions True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 DefaultLighting False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Dimensions True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 DataFields True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Displayset False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 FastCells False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Fill True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Grid False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 LevelOverrides False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 LinesStyles True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 LineWeights True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETHUDMARKERVISIBILITY ON 0 ""\"""

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Patterns True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Tags True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Text True"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 TextNodes False"

    MbeSendKeyin "MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Transparency True"
End Sub

Parents Reply Children
  • Jan,

    Thank you for the info/history.

    Imagine stepping into an organization and dealing with thousands of design files where they do not use dgnlib files, no Cell/Text/Dimension Libraries, arrowheads are created with many small lines instead of fills, when once there were cells they are now dropped to elements, dealing with elements/objects from ACAD and/or Building Designer/TriForma, and on it goes.

    And I am tasked with standardizing it all. Its a combination of: Oh, the horror and what a challenge!

  • Imagine stepping into an organization and dealing...

    I do not have to imagine it, after 25 years with MicroStation I have seen plenty of "data quality" disasters ;-)

    ...dealing with elements/objects from ACAD and/or Building Designer/TriForma, and on it goes.

    Add "great features" like different cells with same names, MicroStation fonts with same numbers spread over several .rsc files or qually named line styles nobodoy knows whether they are the same or not.

    Oh, the horror and what a challenge!

    I agree, it's never ending fight. The only solution is to force people to accept standardization (dgnlib is just a tool, the standardization and data quality are more general concept covering wider area). Without data quality in mind from very early beginning, nothing can be enhanced and solved and such fight cannot be won.

    Regards,

      Jan