New Blog Post - New version of MVBA to create element templates from levels in a dgn file

I've added a new Blog post - New version of MVBA to create element templates from levels in a dgn file with a zip file download. The original VBA project wrote Element Templates using the Level Name as the Element Template Name. I revised to to use the level Description instead and also added filters to strip off any levels coming only from an attached DGNLIB and to skip the Default level. I did not filter out levels that have no descriptions, however.

For anyone starting to use OpenRoads and having few element templates, this is one way to build a quick collection of them.   

  • Dear Mr caddcop

    I am trying to use the "SaveLevelsToElementTemplateXML.MVBA macro that you posted on your Blog +/- 3-years ago... to (obviously) export my Levels, from Level Manager, as an xml file, and to then import said xml using the Element Templates (Manager?).

    I cannot get it to work and I am hoping you can help me out.

    Here is some information and background of what I'm doing...

    • I am running POWER GEOPAK V8i (SELECTseries 10) Ver. 08.11.09.918
    • I have created a dgnlib... (My_Levels_Element_Templates_Features.dgnlib)
    • I have created all the levels, and level filters, the way i want them.
    • I put the SaveLevelsToElementTemplateXML macro in the same folder as the dgnlib.
    • I'm in the dgnlib, referenced above, while attempting this.

    This is what I'm doing...

    I go to Utilities=>Macro=>Project Manager. In Project Manger, I "Load Project" and load SaveLevelsToElementTemplateXML.MVBA. I then go to RUN and run the macro.

    I get this...

    It seems to be hanging up on that line in blue...

    I'm I doing Wrong???...

    I really would appreciate your help

    I hope this message finds you and finds you well and I hope to hear from you soon as i am in a bit of a time constraint with this thing.

  • I am not Chuck, so I cannot speak with certainity, but that macro may have been written for OpenRoads designer, which runs on the Connect 64-bit platform. You are running SS10, which is V8i 32-bit based software.

    I know that VBA are not as version-specific as some of the other programming languages used for Bentley products, but it's entirely possible that a program written for 64-bit Connect may not run correctly on 32-bit V8i.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

  • There is a Reference to a Microsoft XML DLL in that project.

    Microsoft has messed with the code and sometimes code from one version does not work in another version.

    The code uses calls for Microsoft XLM, V4.0

    The other DLL's are Microsoft XLM, V2.0 and Microsoft XLM, V6.0

    If your PC can't locate Microsoft XLM, V4.0, you might need different code for the other DLL's.

    BTW, I took code created by Bentley and simply changed the code to read the level description instead of the name to use as the element template.

    This is a link to the original file: https://communities.bentley.com/products/road___site_design/m/road_and_site_design_gallery/268431

    I was able to run it on MicroStation Ss10.

    Mary is partially correct - I believe it was written to help users bulk create element templates needed by Open Roads but I think it was for the initial Ss3/ss4 versions but also works in ORD.


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • DARN... it didn't work. i downloaded the file... put it into my folder ran it and it hangs in the same place...

    So... do i need to update my machine with the ...XLM... ?

    BTW I am very grateful you and MaryB are helping me.

  • Ok... I have Microstation Connect Edition on another computer (64-bit operating system ALSO) and tried to run this macro...

    that machine is telling me...

    "The code in this project must be updated for use on 64-bit systems.Please review and update Declare and then mark them with the PrtSafe attribute"

    So what does this mean?

    Or does it mean anything?

    What do you think i should do?