Hello everyone, I have a question regarding loading custom UCF file during the startup of Microstation CE application(and also OpenCitiesMap/Advanced, OpenCities Map Ultimate).
Back in the days of V8I, there was an option to launch the Microstation with my own UCF file using the command line switch ws_USTN_USERCFG="myFile.cfg"... I made some investigation on this approach in this CE world and found out following :
My question is, how did you guys solve the situation to launch a given application but with your own UCF file? I mean, I was thinking about copying my files into the prefs folder and name them Personal, but that means my configuration will replace everything and maybe sometimes I want to use it without it. Then another problem is that every product has its own folder path, so basically I have to copy my UCF into the correct folder depending on the installed version (and then I also though about what would happen if the directory path changes with some new updates[right now its in Microstation\10.0.0\prefs] - another trouble!).
Or is there a better and easier way to achieve loading selected UCF during the startup?
Thanks for any suggestions.
Hi Lubo,
The file where a custom configuration is best defined is "C:\ProgramData\Bentley\<applicationName>\Configuration\ConfigurationSetup.cfg"
You can also define additional statements in the General section of that file, for example:
_USTN_WORKSPACENAME = MyWorkSpace%lock _USTN_WORKSPACENAME_USTN_WORKSETNAME = MyWorkSet%lock _USTN_WORKSETNAME
Which would pre-set WorkSpace and WorkSet.
ConfigurationSetup.cfg is the recommended point at which to start configuration; we do not recommend modifying mslocal.cfg or any other system CFG files.
I will discuss your question with a colleague from the OpenCities product team.
Marc
There's some information in this blog post for UCF:
communities.bentley.com/.../connect-edition---configuration-tips-user-preferences-in-onedrive-or-other-locations
Hello Marc, thanks for your input!
I found a way to retrieve the path to the product/config/ folder (from registry!). This way, i can refer to the correct mslocal.cfg with my own .cfg file. I was just wondering, if there exists some kind of variable, that is available to me in my own .cfg, that references the directory of the application that is being called (for example MapAdvanced.exe directory etc.). All these paths are defined only after including mslocal.cfg. And I wanted them before the include.
I like this setup more over your ConfigurationSetup.cfg, because I can save my .cfg file whenever I want without modifying multiple files on host machine (just like back in the days of V8I, with possibility to attach our own UCF file). But to be honest, I´m glad you suggested this approach as well, as I didnt know about it before. Now i have another option available, so thank you.
the fact that the MSLOCAL file needs to be included in your custom configuration file is the whole problem.
If Bentley would fix/change this then this whole situation would not be needed.
Timothy Hickman
CADD Manager | CADD Department
timothy.hickman@colliersengineering.com
Main: 877 627 3772|
1000 Waterview Drive Suite 201 | Hamilton, New Jersey 08691