MicroStation, Version 08.11.09.832
Two questions:
In the instructions under "Configuration Variable File Syntax" for every version of MicroStation I have used in years, there is a small section explaining how and when these brackets: ()
And these brackets: {} are used
I don't get very complex very often and so do not completely understand the difference circumstances under which these two should be used.
Second:
If I am trying to create a complex line in a config file, like the following:
%include $(_KIC_DISCIPLINE){_USTN_USERDESCR}.cfg level 2
I am trying to understand when the $ is used and when it is not needed.
I have seen some examples where it is used a couple times in a line, and some lines where it looked the same, but was only used once. In the above example, I'm not sure I would need one between the two sets of brackets (and relating to the other question, if the second set of brackets I am using is correct).
Thanks.
Hi,
Unknown said:Two questions:
It's highly recommended to ask for one (and only one) issue in a post. It also leads to more efficient discussion. To mix two questions is not good idea.
Unknown said:I don't get very complex very often and so do not completely understand the difference circumstances under which these two should be used.
In my opinion the difference between $() and ${} is clear, but I agree it does not provide a recommendation when what type of the definition should be used:
My personal recommendation is to use $() style definition everywhere. Only if there is something very fixed (like definition of folders of e.g. installed application), it makes sense to use ${}.
Unknown said:I am trying to understand when the $ is used and when it is not needed.
Can you share some examples of places where $ sign is not used? I quickly check MicroStation configuration files and have not found any. But I did not spend too much time with this check ;-)
MicroStation variable is always defined using $(), so if more variables should be merged together, it should look like this $()$().
Where you can see variable names without $ sign is when operators are used, because these functions takes variable name (not final result) and make own variable processing. An example is WORKSETEXT = ext (_USTN_WORKSETCFG), which returns a file extension, so in this case ext() function will return probably .cfg as a result (example taken from CONNECT Edition, I think WORKSETEXT does not exist in V8i).
I hope it helps a bit :-)
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan, would you mind explaining why "MicroStation variable is always defined using $()"? i,e. What is the significance of defining the variable using $ sign?
Hi Shila,
it's recommended to do not re-open odl discussions, and this one is 5 years old. Usually it's better to ask in a new post.
Shila Shrestha said:why "MicroStation variable is always defined using $()"?
It's not always, only when a variable is defined using another variable.
Shila Shrestha said:What is the significance of defining the variable using $ sign?
How MicroStation configuration works and what is a syntax of configuration files is in detail described in MicroStation documentation, including how and when to use $( ), ${ } or to define the variable value directly.
I also recommend to create msdebug.txt file and try to read it and understand the workflow, because it illustrates how variables are defined using another variables.
Answer Verified By: Marc Thomas