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