ConfigurationSetup.cfg being changed

My testing is with OpenRoads Designer 10.08.01.33 (2020 Release 2 Update 8) but I believe this is more a MicroStation Connect issue (I have not tested in MicroStation Connect).

default ConfigurationSetup.cfg as below:

[General]
_USTN_CUSTOM_CONFIGURATION=C:/ProgramData/Bentley/OpenRoads Designer CE/Configuration/

[SetConfiguration]
%if !defined (_USTN_USER_CONFIGURATION)
%if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION))
_USTN_CONFIGURATION = $(_USTN_CUSTOM_CONFIGURATION)
%endif
%endif

Open a file with one of the installed workspace/workset.

Now change _USTN_CUSTOM_CONFIGURATION (I changed to C:/CADDLib/Connect/ which is an internal location for us)

Open ORD again, when the backstage workspace/workset selector is open check ConfigurationSetup.cfg and (if you have the same problem as us) you'll see the line _USTN_CONFIGURATION has been hard-coded to the _USTN_CUSTOM_CONFIGURATION.

[General]
_USTN_CUSTOM_CONFIGURATION=C:/CADDLib/Connect/

[SetConfiguration]
%if !defined (_USTN_USER_CONFIGURATION)
%if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION))
_USTN_CONFIGURATION = C:/CADDLib/Connect/
%endif
%endif

I can also trigger this by setting _USTN_CONFIGURATION in a different file (for example WorkspaceSetup.cfg), i admit this would be a kind of dumb thing to do but it does trigger it.

Important part seems to be you have to open a file using the one _USTN_CONFIGURATION, then exit, modify _USTN_CONFIGURATION and open ORD again. At that point the _USTN_CONFIGURATION is re-rewritten. If at this point you change _USTN_CONFIGURATION back to _USTN_CONFIGURATION = $(_USTN_CUSTOM_CONFIGURATION) it won't be changed again until you change _USTN_CUSTOM_CONFIGURATION in ConfigurationSetup.cfg (or _USTN_CONFIGURATION in a different cfg file)

This is kind of killing me at the moment because we actually need to change the _USTN_CUSTOM_CONFIGURATION for a particular client and flipping back and forth is going to be necessary. My normal ConfigurationSetup.cfg has logic for detecting this and setting the correct one, but when it does the value is then hard-coded into the configurationSetup.cfg.

Parents
  • I've had problems with the _USTN_CUSTOM_CONFIGURATION variable too.

    To get around this I set the value of _USTN_CUSTOM_CONFIGURATION as needed in a different config file that gets loaded prior to the loading of ConfigurationSetup.cfg. After defining the variable I lock it so it can't be changed. 

    Have you tried moving the logic you have in the ConfigurationSetup.cfg to a custom config file that loads earlier in the startup process?

    Rod Wing
    Senior Systems Analyst

  • Hmm, _USTN_CUSTOM_CONFIGURATION seems to be OK for me. I fixed this thanks to your hint of trying a custom config file (but probably not the way you're thinking).

    I changed the [SetConfiguration] section of ConfigurationSetup.cfg as below. (my logic for determining the correct _USTN_CUSTOM_CONFIGURATION is still in the [General] section.

    [SetConfiguration]
    %if defined (_DO_NOT_DEFINE)
    _USTN_CONFIGURATION = C:/CADDLib/Connect/
    %endif
    %include $(_USTN_INSTALLED_CONFIGURATION)SetConfig.cfg
    

    Then my SetConfig.cfg file has the old logic:

    %if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION))
    _USTN_CONFIGURATION = $(_USTN_CUSTOM_CONFIGURATION)
    %else
    	%error Unable to location Configuration folder $(_USTN_CUSTOM_CONFIGURATION). Please contact your local support person or email the service desk at help@example.com [User = $(Username) Computer = $(ComputerName)]
    %endif
    

    basically the test for a variable that doesn't exist gives a place for MicroStation/ORD to change _USTN_CONFIGURATION all it wants but doesn't actually affect anything.

    Moving the real logic to the separate file was needed because having it in the same file caused microstation to  delete the 2nd time the variable appeared.

     

  • Can either of you comment on _USTN_CONFIGURATION getting changed in the ConfigurationSetup.cfg file due to choosing a different WorkSpace/WorkSet from the Work Page?  I have a custom configuration on the network, but users who are doing training or reviewing examples will need to use a local workspace in the installed configuration (like the "Examples" WorkSpace that comes with MicroStation).  For everything to load correctly when there is a Workspace change, I have to advise my users to open a file with the selected WorkSpace, then immediately exit MicroStation, then restart it again and proceed to work in that selected Workspace.  To go back, repeat the process.  Hate doing this, but it works where my configuration coding hasn't.  Any general advice would be appreciated.

    Warren J. Malveau
    Senior CADD Support Specialist
    Los Angeles County Sanitation Districts
  • This might be tough to answer without a deep dive into your configurations. 

    The one thing I've seen issues with is having separate sets of User Preferences for different WorkSpaces. The .upf and associated files may not load correctly when they are changed in this situation.

    What kinds of things do not work correctly when you switch between WorkSpaces?

    Rod Wing
    Senior Systems Analyst

  • MicroStation writes to the [Set Configuration] section of SetupConfiguration.cfg to confirm the location of the last used WorkSpace (and hence it's WorkSets), updating _USTN_CONFIGURATION to the appropriate value.

    Out of the box, once a custom configuration location is available, we show both custom configuration and the examples, we'd need to know more about your config to advise further.

    BTW, just a note to say that currently we write hardcoded paths [Set Configuration] section, really we should write the appropriate variables, I filed Defect 1037427: "Application write operations to Line 26 of ConfigurationSetup.cfg should insert configuration variables not hard-coded paths". If you think this is important, please file an SR referencing it. Equally, if this is not important, please let us know.

    Marc

Reply
  • MicroStation writes to the [Set Configuration] section of SetupConfiguration.cfg to confirm the location of the last used WorkSpace (and hence it's WorkSets), updating _USTN_CONFIGURATION to the appropriate value.

    Out of the box, once a custom configuration location is available, we show both custom configuration and the examples, we'd need to know more about your config to advise further.

    BTW, just a note to say that currently we write hardcoded paths [Set Configuration] section, really we should write the appropriate variables, I filed Defect 1037427: "Application write operations to Line 26 of ConfigurationSetup.cfg should insert configuration variables not hard-coded paths". If you think this is important, please file an SR referencing it. Equally, if this is not important, please let us know.

    Marc

Children
No Data