Open Plant Model Server reference out piping with VBA

I don't know if this is in the correct spot or not so if it needs to be moved le me know.

What I am trying to see if it is possible, is within open plant model server inside of Microstation you can right click on pipe lines and reference out pipe lines from the server. I am looking to do this via VBA to create system master files for a project. Any help is greatly appreciated!!

 

Thanks

Mark

Parents
  • Sorry guys the pictures didn’t come through the first time I posted, I updated the last two posts with the pictures I had attached.
    -Mark
     
    From: Mrc1986 [mailto:bounce-Mrc1986@communities.bentley.com]
    Sent: Tuesday, August 05, 2014 10:47 AM
    To: PlantDesignandEngineering@communities.bentley.com
    Subject: RE: [Plant Design and Engineering Forum] Open Plant Model Server reference out piping with VBA
     
    View and reply online
    Replying to this email posts your reply in the thread.

     
    Jojje,
         I had tried that as well and it would show all the pipe lines on the system but it would not reference them out as a group. What I did find interesting was that if you right click on the pipeline under the query it would allow you to reference out that line.
     
    Here is the query:
     
    Here is the query reference out:
     
     
    Here is a line under the query:
     
    [collapse]
    From: Jojje [mailto:bounce-Jojje@communities.bentley.com]
    Sent: Tuesday, August 05, 2014 10:13 AM
    To: PlantDesignandEngineering@communities.bentley.com
    Subject: RE: [Plant Design and Engineering Forum] Open Plant Model Server reference out piping with VBA
     
    View and reply online
    Replying to this email posts your reply in the thread.

     

    Im also interesting in knowing how one should do this...

    Had an idea that maybe I could create a local/global "Query" on all pipelines....unfortunatly when referencing out a complete query I didnt get any graphical objects. Only the pipelines. Im abit puzzeled why thou?

    Making a query on all pipecomponents works thou but then u will go missing on for example supports and probably some other objects I think.

    [/collapse]
  • Let me try to explain on how check-out/ref-out works.

    Referencing out a query results:

    So, when you do create a query (search) you do select a class of which type you will be referencing components. So, if you do select a class Pipeline (PIPING_NETWORK_SYSTEM) as a search class, when you do try to reference out that full search it does only reference out classes which were searched for (and in case sub-types were selected it's child classes). As PIPING_COMPONENT is not a child component of a PIPING_NETWORK_SYSTEM class (they just have relationships between them), they are not included into the referenced out components. However you have an option in a tree to browse through relationships and find and retrieve the components you need further down.

    Referencing System/Unit for a possible refresh later on:

    As getting back to the original question, the correct way to do this would be to use a root node class in OPMS tree for such a reference out, which by default are Area, Service and Unit. If you use that node to reference out components, and something is changed under that node (new components added to existing pipelines, new pipelines created or deleted, etc.) once that file is reopened and Refresh All command is initiated (Key-in: opms refresh all) all the changes under that specific root node will be updated to your master reference file.

    If you need some other class to group by, not the default Unit/Area/Service you can mark it to be a root node in supplemental OPMS schema (as I can see from Marks screenshots you already have done that).

    Let me know if you'll need more help with this.

    Justinas



  • So in this case it does seem that most likely issue of not being able to reference out by System is due to some issues in your Workspace configuration. As you have added some additional associated items for your components, you might need to create a static OPMS queries (stored in $(_USTN_PROJECTDATASET)ModelServer/).

    Would you mind sending your current workspace for a review for me? You can upload it using the Secure File Upload: communities.bentley.com/.../7079.communities-secure-file-upload.aspx

    It should be working fine if you use Unit for a reference, instead of a System. Can you please try that?

    Regards,

    Justinas



  • Unit works great when referencing out objects.

    I believe you have our workspace already because you are working on an SR that was submitted for a different issue. The ticket number is 7000220168, if you still need something else out of the workspace I will be happy to upload what you need.

    Thanks,

    Brian

  • Hello Brian,

    Yes, I actually just saw that these are the same workspaces. I have used the original static queries for UNIT/SERVICE in Project\DataSet\ModelServer folder and created these for your custom associated items. Please, place them into your project workspace and see if it will work fine afterwards.

    Regards,

    Justinas



    static_queries.zip
  • Justinas,

    I placed these queries in the workspace and everything is referencing out now, thank you. So, if later down the road we add in a new model server node all I need to do is copy one of these queries and do a simple find a replace for the class name I am searching by along with the relationship class?

    Thanks,

    Brian

  • Hello Brian,

    Yes, generally it is how it's created. You can just use any text comparison tool and see what are the exact changes between these files and the out of the box UNIT/SERVICE queries so you will see a general lines which should be changed.

    Was glad to help you make this work.

    Regards,

    Justinas



Reply Children
No Data