Configuration Variable Processing

[V8i]

I understand (I think) the level setting of variables being processed, but the specific order of processing files seems to make a difference and I am missing something.

First mslocal.cfg is processed which calls msdir.cfg and then to msconfig.cfg.

Msconfig.cfg calls all the .cfg files in the system directory which are processed alphabetically.

So (for instance) when it gets to markup.cfg

There is the following lines

MS_MARKUPPATH : $(MS_DEF)

MS_DEF hasn't been defined yet. Does the definition wait for MS_DEF to be defined in a later configuration file?

Similar to

GroupPanelPrefSeed.cfg

MS_GROUPPANELPREFSEED > $(MS_DATA)MicroStationGroupPanelPrefSeed.xml

MS_DATA isn't defined yet. Again, does this definition wait for MS_DATA to be defined?

Thanks,

Jonathan

Parents
  • Hi Jonathan,

    Unknown said:
    but the specific order of processing files seems to make a difference

    In my opinion the most simple way to check how the variables are created is to create msdebug.txt file and to analyse this file. It's not clear if you use this approach or you analyse directly cfg files, which is more complex and not always simple to understand.

    Unknown said:
    MS_DEF hasn't been defined yet. Does the definition wait for MS_DEF to be defined in a later configuration file?

    I guess your confusion comes from not distinguishing between a variable definition and the variable evaluation:

    When a particular variable is defined, MicroStation "registers only" that such variable should be created (added to the list of variables) and how it is defined. If the variable is defined using a reference to another variable (like MS_MARKUPPATH you mentioned), used brackets play important role there:

    • If ( ) are used, the reference is maintained and is resolved when the variable is used (so it's evaluated every time it's used, potentially with different results). 
    • If { } are used (they are used rarely), the reference is evalauted immediately and the reference is lost.

    Because the most of variables are not used when the configuration files are processed, MicroStation does not care if some variable is defined using another variable that has not been defined yet.

    Unknown said:
    does this definition wait for MS_DATA to be defined?

    No, cfg files are processed in "a batch mode" like scripts. The only "waiting state" is when MicroStation Manager dialog is opened and you can select your workspace (user, Project, Interface) and a design file to be opened. In this state MicroStation is "half initialized" ´, because it waits what ucf and pcf files should be used. But this break is because of a user's interaction, not because of a variable definition.

    Because MS_GROUPPANELPREFSEED is defined using ( ), the evaluation of the definition will happen when the variable will be used. And because this variable belongs to GUI configuration, it will be used when a design file will be opened and MicroStation will be fully initialized ... and it's expected MS_DATA will be defined correctly at this time ;-)

    With regards,

     Jan

    Answer Verified By: Jonathan Winn 

  • Thanks! That was very helpful. That was the information I needed to understand how this is processed. I started looking at the .cfg files directly, and then I ran msdebug. It still wasn't clear to me what was happening so thanks again.
Reply Children
No Data