Batch Process: make reference settings match the reference

I am looking for a reference sync batch process that I can use to force reference files to match settings to the parent.  For example lets say I make several level changes to a design file.  In the sheet files where that file has been referenced sometimes especially in older projects the change will not make its way through to the sheet file.  I want to create a batch process that can do this:

#----------------------------------------------------------------------------------
# Batch process to synchronize referenced files with their parent
# By: Matt Spencer 2015.5.19
#----------------------------------------------------------------------------------

#----------------------------------------------------------------------------------
#Match reference display settings with parent

reference synchronize levels display "Master"

#----------------------------------------------------------------------------------
#fit view
FIT VIEW EXTENDED

#----------------------------------------------------------------------------------
#file>save settings
filedesign

#----------------------------------------------------------------------------------
#file>save
save design

What is the best way to go about this without manually listing the correct list of levels for each reference. Am I pretty close?

  • This post is has the same objective as mine, but with a slightly different approach:
    communities.bentley.com/.../87621

    I want to be able to handle reference level control in nested references as well.

    This question is very similar to mine as well, but is unanswered:

    http://communities.bentley.com/products/microstation/f/19565/p/66846/172445#172445

  • I am having the same problem and could not find an answer searching here. The command I came up with follows, but does not work. Anyone have any suggestions besides re-attaching?

    reference update LEVELNAME FILE.dgn;selview 1

    I tried it like this as well:
    reference update * FILE.dgn;selview 1
  • Not sure if you are just asking to synchronize level attributes to the master reference or something else but these key-ins work to turn levels on/off and updating the level attributes.

    Your syntax to turn levels on and off should be as follows:

    level set display off file:[file name] "level"

    #format must remain as this example file:LEB-DS01.dgn P-CL

    level set display on file:[file name] "level"

    #format must remain as this example file:LEB-DS01.dgn P-CL


    Nested files:

    level set display on file:4048ml-E&S-nesting.dgn->"4048ml-esds01.dgn" esc-WATERBAR

    level set display off file:4048ml-E&S-nesting.dgn->"4048ml-esds01.dgn" esc-WATERBAR


    Synchronize levels to master files:

    dgnlib update levels custom (The updating is controlled by the variable MS_LEVEL_SYNC_ATTRIBUTE_LIST) This will update all levels to the master references. Not sure about using this with nested references.

    Microstation CONNECT 10.17.00.209

    ORD CONNECT 2021 R1 10.10.1.3

    Microstation v8i SS 10 08.11.09.919

    Power InRoads v8i 08.11.09.615

    ORD CONNECT 2021 R1 10.10.1.3

    ProjectWise 10.0.3.453

  • Thank you, the update levels command here worked. It updates the settings without changing the on/off status, which is good, I can control those separately.