Is there a WorkSet variable so only specific versions of ORD can open project files?

Being that we can now have multiple versions of ORD installed and many of us are working on different projects with different versions of software, is there a way to set a config file to check if the user is opening the file with the correct software, and if not, have an error window pop-up? 

I have a dynamic managed workspace set up and there is code in the WorkAreaPWSetup_Predefined_*.cfg:

"%if defined (_VERSION_8_11)" and "%elif defined (_VERSION_10_0) " so is there a way to narrow down the version further by adjusting these variables?

  • You can differentiate different versions of OpenRoads Designer using the Product - Full Marketing Name

    OpenRoads Designer 2020-R2 (version 10.08.01.33) = _USTN_PRODUCT_FULLMARKETINGNAME = OpenRoads Designer CONNECT Edition - 2020 Release 2

    OpenRoads Designer 2020-R3 (version 10.09.00.91) = _USTN_PRODUCT_FULLMARKETINGNAME = OpenRoads Designer CONNECT Edition - 2020 Release 3

    OpenRoads Designer 2021-R1 (version 10.10.01.03) = _USTN_PRODUCT_FULLMARKETINGNAME = OpenRoads Designer CE - 2021 Release 1

    You have to make sure you are showing the hidden variables (under_score variables) using _USTN_DISPLAYALLCFGVARS = 1 in your configuration settings when checking/setting these variables

    If using ProjectWise, I think you can assign specific versions of product to your managed workspaces

    Each product/version can be defined using a unique product key "Program Class Name" (I typically run a -debug to capture the key information)

    I do not have a complete list (not sure if Bentley publishes... it would be nice!)

    I will attach a spread sheet where I started to track/document the Program Class Names as I needed/used them.

    HTH

    Bentley - Program Class Names - 20200820.xlsx

    MISSING RESOURCE: VerifiedBy Jennifer Miedema 

  • Hi David,

    This is very helpful, thank you! I'll test out some code to see if I can get the workset to accept/reject opening the file based on version and if/when I get something working will post the code in this thread :)

  • Ok, I think I've got it! Added this code to a workset config file:

    %if $(_USTN_PRODUCT_FULLMARKETINGNAME) != "OpenRoads Designer CONNECT Edition - 2020 Release 3"
        MS_READONLY = 1
        #%error This WorkArea requires OpenRoads Designer CONNECT Edition - 2020 Release 3 to open this file
    %endif
     

    Ran a test. Opens perfectly in OpenRoads Designer CONNECT Edition - 2020 Release 3 and as read-only in OpenRail Designer CE - 2021 Release 1

    I left the commented out error code in there, just in case someone doesn't want the file to open as read-only in other software.

    Thank you again for your help!

    MISSING RESOURCE: VerifiedBy Jennifer Miedema