Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Future consideration
Categories General
Created by Guest
Created on Nov 21, 2023

MicroStation Configuration: _WorkDir _DGNFile, _DGNDir

In its current form, from my tests so far and chatting with BSI Support, in the MS Configuration read/load phase at application start-up, the config variable '_WorkDir' is populated at the beginning of configuration read. It appears to be populated by the short cut icon, or when double-clicking the application.

However, _DGNFile and _DGNDir are not populated until the resolve phase of configuration loading, when the application interface/runtime starts.

I've debugged many times to try and make configuration logic decisions work at the read/load phase of configuration to no avail until I discovered the reason.


I have a sample debug command line to use in a Windows Shortcut icon.

It pre-loads a selected CAD file.

"C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe" D:\CAD\ Test_Files\Test_File.dgn -DEBUGFILEOPEN=5

Check the msdebug.txt to find _DGNFile, _DGNDir, they are both Null values.

But when looking at the variables from inside the application, they are both populated.

My change request is to attempt to have _DGNFile and _DGNDir populated at the beginning of the Configuration read phase so the variables can be used in logic decisions during configuration read/resolve phases.

Is this doable?

  • Guest
    Reply
    |
    Feb 19, 2024

    Hello,

    To follow up regarding this idea, if the pre-processor is going to be able to read the full file path from device or cloud to file name and file path so it can be queried in the configuration stage then I think that some of the Configuration Operators need to be updated to account for reading file extensions because at present i don't think they can?

    For example the 'ext' would need to be able to see the DGN/DWG/DXF/DGNLIB/CEL file extensions:

    MSV8i format: ext($(VARIABLE))

    MSCE format: ext((VARIABLE))

    The Device 'dev($(variable))' operator would need to be able to read the local device, the cloud data source and the UNC path.

  • Guest
    Reply
    |
    Nov 21, 2023

    Just to clarify, there are two apparent phases in the MS pre-processor Configuration load.

    The Read Phase

    The Resolve Phase

    [Some variables can be resolved immediately using {squiggle brackets}, the rest are resolved at the end with normal brackets]

    The Resolve Phase is where I find that _DGNFile and _DGNDir are not populated.

    Those two variables are populated after the Resolve Phase when the executable reads the resolved configuration, and that's when _DGNFile and _DGNDir are populated.

    To make use of those two variables earlier I'm requesting them be populated in the Read Phase, if possible?

    Seeing that when I double-click a file in Windows the file association already exists [OpenWith Key/MicroStation.exe %1 in Registry]

    1 reply
1 MERGED

_DGNFile - Load in Pre-process

Merged
Sorry for the long description but I wanted to be as clear as possible. Request that _DGNFile be populated with the full path of the CAD file that is being opened [and when a new file is being opened the configuration variable is reloaded and can ...
11 months ago in General 0 Future consideration