Named Expression last folder of _DGNDIR

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

Parents Reply
  • 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.


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Children
No Data