Hey all.
Named Expression question again. I am working on show/hide statements for MicroStation UI and trying to define a named expression that will give me the active working folder by resolving it from _DGNDIR. As most of you know _DGNDIR by nature resolves the entire folder path but I just need the last folder of that path to show specific tools when in that folder(s). The catch here is that I am utilizing the named expression for this as opposed to defining an configuration variable so that MicroStation does not restart in a ProjectWise Integrated environment. If I define a "variable" = $(LastDirPiece(_DGNDIR)), it works but as I navigate from folder to folder, the application does a force restart to redefine the variable.
Here is what I currently have but it resolves false since the config var is expanding the path and not the last folder.
ConfigVar.GetExpandedConfigVar("_DGNDIR")="DE Spec Dwgs"
I have tried a few different combinations but I am not getting anywhere. I am not a coder and have pulled some rabbits out of the hat so any help is very appreciative.
Thanks ahead of time!
Mark W
I found this was a task for VBA. I defined variables in my CFG files using other variables that were undefined at startup.
Then, during startup, I retrieve the active file and its path and use it to defined those variables. This has served me well. I'm not in my office so I can't paste any code right now, however..
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
It appears that named expressions in MicroStation cannot be used to point to ProjectWise locations. When using PW the location will always resolve to your local PW working DMS folder.
Even MicroStation uses variables to point PW locations to local folders. Once you understand how those work, you can even define variables to place in UCF and/or PCF files to allow offline working with checked out PW documents. You wont get the hints about reference files needing updating, but if you are having issues with a managed workspace it allows users to work when you might otherwise be dead in the water.
Mark,
With regards to PW restarting as you move from foldfer to folder, If you add that variable to PW_MWP_COMPARISON_IGNORE_LIST in ProjectWise Adminstrator, you can stop the restarts. You're basically tellling PW "I know this variable is different, don't restart MicroStation"
HTH
TomF
Thanks for the information. However that statement is stopping the reload of the application. But if a variable calling the active folder is set on load and then you navigate to a different folder, the variable is not being redefined to that new location with the ignore statement. We need that ability to redefine the variable to the different folder location without reloading the application. So far the only way we think this is attainable is view VBA or named expressions. We know we can do it with VBA but we are trying to not go that route.