MSCE U17 Manage Configurations and using _USTN_CUSTOM_CONFIGURATION variable

It seems that the new Manage Configurations in U17 totally ignores the value of _USTN_CUSTOM_CONFIGURATION

Trying to load configurations from U16 where the value of _USTN_CUSTOM_CONFIGURATION set in the ConfigurationSetup.cfg file displays the correct configuration path, this no longer appears to work in U17.

Is there some other setting I'm missing, or is the _USTN_CUSTOM_CONFIGURATION variable obsolete?

Parents
  • That's not what I'm seeing but it's goofy as heck.

    With the shipped ConfigurationSetup.cfg there is this section:

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

    When you pick a configuration from the Configuration.xml in your user prefs, it changes line 4 to be the variable specified in the <ConfigurationVariable>VARNAME</ConfigurationVariable>

    So with the shipped configuration.xml, if you pick Examples it changes line 4 to as above. If you pick Custom Configuration it changes ConfigurationSetup.cfg [SetConfiguration] to:

    [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
    

    Now it's using the _USTN_CUSTOM_CONFIGURATION. If that variable is NOT set in the ConfigurationSetup.cfg, it will use the value in <Path>C:\MyConfig\</Path> section.

    If you have a value set in the ConfigurationSetup.cfg, even if it's different than what's in the configuration.xml, it will use that.

    I've found the best way to force it to always use _USTN_CUSTOM_CONFIGURATION is to have a configuration.xml with only one option in it. Set the Path to your correct path, set IsActive to true, set IsSelected to true and set IsEditable to false.

    <?xml version="1.0" encoding="utf-16"?>
    <ArrayOfConfigurationModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ConfigurationModel>
        <Title>Custom Configuration</Title>
        <Description />
        <ConfigurationVariable>_USTN_CUSTOM_CONFIGURATION</ConfigurationVariable>
        <Type>Local</Type>
        <IsActive>true</IsActive>
        <Path>C:\My\Config\Path\</Path>
        <IsSelected>true</IsSelected>
        <IsEditable>false</IsEditable>
      </ConfigurationModel>
    </ArrayOfConfigurationModel>

     

  • An alternate option if you want multiple options with the values set in ConfigurationSetup.cfg instead of configuration.xml. Create your ConfigurationSetup.cfg like:

    [General]
    _MY_CUSTOM_CONFIG1=C:/Config/Path1/
    _MY_CUSTOM_CONFIG2=C:/Config/Path2/
    _MY_CUSTOM_CONFIG3=C:/Config/Path3/
    
    [SetConfiguration]
    %if !defined (_USTN_USER_CONFIGURATION)
    %if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION))
    _USTN_CONFIGURATION = $(MY_CUSTOM_CONFIG1)
    %endif
    %endif
    
    

    Then in the configuration.xml you create 3 entries and set the ConfigurationVariable on each to use a different variable, one of the ones in the [General] section.

    Now when you select different ones the [SetConfiguration] section will change the variable used to set _USTN_CONFIGURATION

     

  • Thanks for the info Kevin.

    I don't have time to investigate this any further. To get my existing configurations to work the way I had things set up I've removed U17 and gone back to U16. When I have time I'll reinstall U17 and check it out.

    Rod Wing
    Senior Systems Analyst

  • After installing MicroStation Update 17 I was having the same issue and found this forum. The information on the existence of "configuration.xml" was new to me, but helped me "solve" the problem, at least for me.

    The configuration.xml file is found in the local user prefs folder (C:\Users\<username>\AppData\Local\Bentley\MicroStation\10.0.0\prefs) along with all the other user preference files. It appears that there are some old files and/or entries in that folder that are causing conflicts with Update 17 configuration. I tried editing some things as Kevin suggested, but I found that simply deleting the entire 10.0.0 folder did the trick. (I backed up the old 10.0.0\prefs folder, just in case.)

    Launching MicroStation recreated the 10.0.0\prefs folder with new clean preference files. Now MicroStation recognizes my custom configuration location from my existing ConfigurationSetup.cfg and works just as previous CE Updates did. The custom configuration will be under "Custom Configuration"...

    Unfortunately, this implies that the local user preferences will need to be reset for everyone that gets upgraded to Update 17. Also, any custom user configurations and preferences will be lost and require setting up again... unless someone can figure out exactly what's causing the conflict?

    Hope this helps.

  • What I've done is switched to using _USTN_USER_CONFIGURATION in our ConfigurationSetup. This makes the Configuration selector in the upper left have only one option: "User Configuration", no other entries from the user's configuration.xml are listed.

    This is what I have in our ConfigurationSetup.cfg file:

    [General]
    _USTN_USER_CONFIGURATION_LABEL = Company Configuration
    _USTN_USER_CONFIGURATION       = C:/CADDLib/Connect/
    
    [SetConfiguration]
    %if !defined (_USTN_USER_CONFIGURATION)
    	%if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION))
    		_USTN_CONFIGURATION = $(_USTN_INSTALLED_CONFIGURATION)
    	%endif
    %else
    	_USTN_CONFIGURATION = $(_USTN_USER_CONFIGURATION)
    %endif
    %lock _USTN_CONFIGURATION
    

     

  • I found the weird %if !defined(_USTN_USER_CONFIGURATION) wrapper around the original configurationsetup.cfg's %if defined(_USTN_CUSTOM_CONFIGUATION) is necessary to keep those lines from being added at the end.

     

  • Changing the configuration to use _USTN_USER_CONFIGURATION as in your sample seems to work as desired and expected. I was able to use my old user pref files from the backup and all my user settings work as before. I will be using this modified ConfigurationSetup.cfg on our MicroStation CE installations.

    Thanks!

Reply Children
No Data