I am trying to do some Ribbon customizations and was running into an issue as to where my dgnlib file was located. I thought I was in the proper directory, but apparently I was not, so changes were happening to the "personal.dgnlib" file instead. When I was trying the same process on my laptop, it was actually working properly. Looking at the MS_GUIDGNLIBLIST variable, I see what is happening, but I am unsure as to how to fix it since it seems to be broken at the 'System' level and I've just gone though what I thought were the system .cfg files to no avail...
On the laptop (where everything works fine), this is what I have for the variable:
On my work pc (after commenting many cfg files):
By the looks of it, MicroStation Connect is somehow trying to get my default Documents directory. My laptop is not managed by my IT department, but the pc is on the Domain and I know they manage the Home folder with AD.
The question is: How is MicroStation finding this directory? Is this setting modifiable from a MicroStation config or is it programmatically done?
Yes, I know I can reset the variable using '=', but I normally do not do this in my configurations due to version changes/enhancements.
in my opininon the best first step is to produce msdebug.txt file (start MicroStation with -debug=5 argument, see e.g. this article for more information) both for you work and personal computers. Comparing these two files it will be more clear how the variables are creates and how your home and work configurations differ.
Personally I am not sure if it's correct to try to define customization on system level, MicroStation CONNECT Edition provides new variables, so the configuration is more flexible (in my opinion ;-) and personal.dgnlib defined using MS_PERSONALDGNLIB looks like better approach.
I have two note to the captures you provided (thanks for them, they are helpful):
Final question is: What do you want to achieve? Do you want to have one dgnlib file with your personal customization, so you will be able to share it easily between work and home computer? Or your aim is something different?
Labyrinth Technology | dev.notes() | cad.point
Thanks for reminding me about the debug argument...major brain fart on my end.
The debug confirmed that the variables were still being set by backup files I had in the folder that the system files reside. Had to rename the files to a .bak to prevent them from applying. This allowed me to finally track down what is really going on here.
By looking at the debug file with further testing, the path was set by _USTN_WORKSETROOT which is set inside of ...Configuration\WorkSpaces\NoWorkSpace\NoWorkSet.cfg which set that variable from the Windows variables HOMEDRIVE and HOMEPATH.
Given our setup here in our Domain, HOMEDRIVE = U: and HOMEPATH = \
This essentially should set the variable to U:\\ instead of the U:// that MicroStation is setting it to. Further testing came to the following conclusion that only a developer would be able to confirm - the real problem looks like a auto-format/parser that they have inside of MicroStation Connect.
Given the above examples, the following things happen:
In my opinion, if multiple backslashes are encountered after a colon, then they should be trimmed down to one instance:
U:\\\ to this-> U:\ not this -> U:///
As to your questions: I was just trying to figure out what was causing the U:// that you noticed wasn't correct either. At this point, the configuration setting is not only affecting this setting, but anything else using _USTN_WORKSETROOT in this instance. I am currently developing a new DGNLIB for our organization's menu system and found it odd that it wasn't modifying the file I was inside of even though it should've been modifiable.
Thanks again for your help with that debug option...
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
To add a few notes Chuck's summary:
The best practices / recommendations for MicroStation configuration files are:
Of course these rules are not strict, so they can be broken, but there should be a serious reason to do it.
Well, there isn't a chance in the world that I'm going to be able (or anyone else for that matter) to convince an IT person that they will need to change a backslash within a standard Windows variable for a Windows directory to a forward slash since this type of symbology is not really valid for a directory path. Even so, changing this variable to a forward slash would still resolve _USTN_WORKSETROOT to U:// which is not a valid path.
Essentially the delivered MicroStation configuration file NoWorkSet.cfg potentially does not work with standard Windows variables that are in proper Windows directory syntax dependent on the IT section's setup of Home Folder within Active Directory/Group Policy.
This is just going to force me to use WorkSets now where I may not have had to use them since I mainly setup our Department at a Site level.
Thanks for everyone's thoughts on this matter.
Sean Duphily said:There isn't a chance in the world that I'm going to be able to convince an IT person that they will need to change a backslash within a standard Windows variable for a Windows directory to a forward slash
You don't need to. Operating system environment variables should be defined in whatever way is suitable for the operating system. MicroStation configuration variables are not operating system environment variables.
MicroStation configuration files are designed to be operating-system agnostic. Years ago, the same configuration file worked with, say, UNIX, MS-DOS and Windows NT. Times have changed, and the only operating system of interest is Windows 7 etc. Or is that the only game in town? We are seeing Bentley Systems products on Android and other operating systems, so it may be that agnosticism will be required once more.
When MicroStation processes its configuration files, operating system environment variables are evaluated as required. If one of your configuration files finds a Windows environment variable MY_WINDOWS_FOLDER it evaluates it for subsequent use as it processes other configuration variables. The appropriate directory separator characters are used or substituted as required.
Define operating system environment variables as required by your operating system. Define MicroStation configuration variables following the rules for those variables documented in MicroStation help and repeated by Bill Robinson and Jan Slegr above.
Regards, Jon Summers LA Solutions