We are going through a large PC refresh and a significant number of our new machines will be laptops. We are trying to work how to have the configuration (cfg) available to the laptop machines when offline. We have set up a sync from the network to the local machine for the cfg. and I have edited the ConfigurationSetup.cfg as follows;
[General] _PDT_nDrv = M:/ _PDT_lDrv = C:/ _PDT_locCFG = PennDOT_CE_Configuration/ %if exists ($(_PDT_nDrv)$(_PDT_locCFG)*.cfg) _PDT_Drv = $(_PDT_nDrv) %else %if exists ($(_PDT_lDrv)$(_PDT_locCFG)*.cfg) _PDT_Drv = $(_PDT_lDrv) %else error Exiting, No network or local Configuration found %endif %endif _USTN_CUSTOM_CONFIGURATION = $(_PDT_Drv)$(_PDT_locCFG) [SetConfiguration] %if !defined (_USTN_USER_CONFIGURATION) %if defined (_USTN_CUSTOM_CONFIGURATION) && ($(_USTN_CUSTOM_CONFIGURATION) != "") && exists ($(_USTN_CUSTOM_CONFIGURATION)) _USTN_CONFIGURATION = M:/PennDOT_CE_Configuration/ %endif %endif
Unfortunately line 21 doesn't seem to like being redefined to a new value.
Here is my debug for this section, note line 9 and 10;
Processing macro file [C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\ConfigurationSetup.cfg] (System): _PDT_nDrv=M:\ [M:\] (System): _PDT_lDrv=C:\ [C:\] (System): _PDT_locCFG=PennDOT_CE_Configuration\ [PennDOT_CE_Configuration\] Starting skip to endif, [C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\ConfigurationSetup.cfg], line 27, depth = 0. (System): _PDT_Drv=$(_PDT_lDrv) [C:\] Starting skip to endif, [C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\ConfigurationSetup.cfg], line 32, depth = 0. endif, [C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\ConfigurationSetup.cfg], line 34, depth = 0. (System): _USTN_CUSTOM_CONFIGURATION=$(_PDT_Drv)$(_PDT_locCFG) [C:\PennDOT_CE_Configuration\] (System): _USTN_CONFIGURATION=M:\PennDOT_CE_Configuration\ [M:\PennDOT_CE_Configuration\] End of macro file [C:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\ConfigurationSetup.cfg]
I have also tried to defining line 21 to use a variable and not be hard coded but that doesn't seem to work.
_USTN_CONFIGURATION = $(_USTN_CUSTOM_CONFIGURATION)
Any help on how others would be handling configurations for laptops would be helpful. I would prefer to not use different icons for Network and Local configurations.
what does the debug look like when you have
Timothy Hickman
CADD Manager | CADD Department
timothy.hickman@colliersengineering.com
Main: 877 627 3772|
1000 Waterview Drive Suite 201 | Hamilton, New Jersey 08691
Tim, One thing that concerns me is this statement in the help.
The ConfigurationSetup.cfg file should not be modified manually. It is automatically updated when you switch Configurations or replaced when the product is updated.
Would you confirm if the changes will be lost upon upgrade?
~HTH
John.
yep
Hi John, Kevin,
The ConfigurationSetup.cfg file is written to on file open to ensure that the active configuration matches the user's selection.
This operation does not modify the content of the [General] section.
It does rewrite the [Set Configuration] section, so any alterations to that section will be overwritten. Statements added to the [Set Configuration] section also affect the parsing of the rewrite, with unwanted results.
The difficulty arises from the way that we write hard-coded paths to the value of _USTN_CONFIGURATION on line 21 (in your example, line 26 in the delivered file). This is an anomaly, I have filed Defect 1037427: 'Application write operations to Line 26 of ConfigurationSetup.cfg should insert configuration variables not hard-coded paths' asking that we write only the appropriate configuration variables to this line.
This line in the [SetConfiguration] section should only have two states in the majority of configurations:
Or
_USTN_CONFIGURATION = $(_USTN_INSTALLED_CONFIGURATION)
A third state is required for users who activate the _USTN_USER_CONFIGURATION variable:
_USTN_CONFIGURATION = $(_USTN_USER_CONFIGURATION)
This will enable you to customise the [General] section with statements such as %if loops that specify the appropriate value of _USTN_CUSTOM_CONFIGURATION, e.g. network or local (laptop) configurations when on/offline.
If you would like to support resolution of this defect please file an SR referencing Defect 1037427.
Regards
Marc
Marc has stated most of the issue. It looks like you are modifying the "set configuration" area - this is intended for the last configuration loaded and is stamped there by MicroStation.
The other part of your question about the whole file being overwritten is correct. When an upgrade happens, this file gets overwritten. The only thing that would get saved from the original file is the _USTN_CUSTOM_CONFIGURATION line - everything else you added would get wiped.
Hi John,
We have Enhancement 854340: "updates overwrite the ConfigurationSetup.cfg" suggesting that we do not overwrite ConfigurationSetup.cfg during upgrades, but append any changes that we need to existing instances of the file.
Please file an SR referencing this enhancement if you would like to support this suggestion.
Thanks.
If they were to fix the first part and make it so it uses a variable and them the upgrade process only overwrite the information under[SetConfiguration] that would be a great help.
Mark or Tim or anyone,
Is there a way to include this more complex ConfigurationSetup.cfg in our layout for installation?
this whole area is being debated in house currently.
So is that a no?
I was pretty sure there was a way to do it. Back in the day I know this was part of the specification to allow for more complex cfgs to be included in an installation package. I don't remember how and I can't find any documentation on it.
I agree with the logic in what you are attempting to do in order to load various configurations (IE: Local verses Network, etc...) and this seems the best place to do it. Unfourtunatly the way the update has been coded, anything other than the custom configuration line gets wiped.