<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Better understanding of MicroStation Variable construction.</title><link>https://communities.bentley.com/products/administration/f/product-administration-forum/119886/better-understanding-of-microstation-variable-construction</link><description>MicroStation, Version 08.11.09.832 
 
 Two questions: 
 In the instructions under &amp;quot;Configuration Variable File Syntax&amp;quot; for every version of MicroStation I have used in years, there is a small section explaining how and when these brackets: () 
 And these</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Better understanding of MicroStation Variable construction.</title><link>https://communities.bentley.com/thread/675598?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 10:37:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1aafec05-1e6b-4ec4-8470-bddc932052b0</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Shila,&lt;/p&gt;
&lt;p&gt;it&amp;#39;s recommended to do not re-open odl discussions, and this one is 5 years old. Usually it&amp;#39;s better to ask in a new post.&lt;/p&gt;
[quote userid="793603" url="~/products/administration/f/product-administration-forum/119886/better-understanding-of-microstation-variable-construction/675548"]&lt;span&gt;why &amp;quot;MicroStation variable is always defined using&amp;nbsp;&lt;/span&gt;&lt;span&gt;$()&amp;quot;?&lt;/span&gt;[/quote]
&lt;p&gt;It&amp;#39;s not always, only when a variable is defined using another variable.&lt;/p&gt;
[quote userid="793603" url="~/products/administration/f/product-administration-forum/119886/better-understanding-of-microstation-variable-construction/675548"]What is the significance of defining the variable using $ sign?[/quote]
&lt;p&gt;How MicroStation configuration works and what is a syntax of configuration files &lt;a href="https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v18/en/GUID-C59A1F56-F723-853A-0469-83F5859385EC.html" rel="noopener noreferrer" target="_blank"&gt;is in detail described&lt;/a&gt; in MicroStation documentation, including how and when to use $( ), ${ } or to define the variable value directly.&lt;/p&gt;
&lt;p&gt;I also recommend &lt;a href="https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v18/en/GUID-D5F85C78-38FB-09E8-5E90-AA98FA33761F.html" rel="noopener noreferrer" target="_blank"&gt;to create msdebug.txt&lt;/a&gt; file and try to read it and understand the workflow, because it illustrates how variables are defined using another variables.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Better understanding of MicroStation Variable construction.</title><link>https://communities.bentley.com/thread/675548?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 05:52:32 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3b71943d-d58d-43f3-b1c0-f6035bfce4ca</guid><dc:creator>Shila Shrestha</dc:creator><description>&lt;p&gt;&lt;span&gt;Jan, would you mind explaining why &amp;quot;MicroStation variable is always defined using&amp;nbsp;&lt;/span&gt;&lt;span&gt;$()&amp;quot;? i,e. What is the significance of defining the variable using $ sign?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Better understanding of MicroStation Variable construction.</title><link>https://communities.bentley.com/thread/371155?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 19:14:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5c2811fc-ccf4-4f96-8a5e-dfe5a993d375</guid><dc:creator>Rod Wing</dc:creator><description>&lt;p&gt;Jan&amp;#39;s explanation is correct, but when I explain the difference in our CAD Manager classes I always find an example helps explain it better...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;_CLIENT_STANDARDS = C:/Clients/&lt;strong&gt;Client A&lt;/strong&gt;/Workspace/Standards/&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;MS_DGNLIBLIST &amp;gt; $(_CLIENT_STANDARDS)dgnlib/&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;MS_CELLLIST &amp;lt; ${_CLIENT_STANDARDS}cell/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Later on in your config file sequence the value of&amp;nbsp;_CLIENT_STANDARDS gets changed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;_CLIENT_STANDARDS = C:/Clients/&lt;strong&gt;Client B&lt;/strong&gt;/Workspace/Standards/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When everything is completed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Value of _CLIENT_STANDARDS in MS_DGNLIBLIST &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; C:/Clients/&lt;strong&gt;Client B&lt;/strong&gt;/Workspace/Standards/&lt;/li&gt;
&lt;li&gt;Value of _CLIENT_STANDARDS in MS_CELLLIST &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; C:/Clients/&lt;strong&gt;Client A&lt;/strong&gt;/Workspace/Standards/&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the numerous configurations I&amp;#39;ve done I can&amp;#39;t recall ever having to use the ${} syntax. I always use $().&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Better understanding of MicroStation Variable construction.</title><link>https://communities.bentley.com/thread/370116?ContentTypeID=1</link><pubDate>Thu, 02 Jun 2016 05:04:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:044b1dbe-64c0-4726-aa49-48489928eb20</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;RKoons&amp;quot;]Two questions:[/quote]&lt;/p&gt;
&lt;p&gt;It&amp;#39;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.&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;RKoons&amp;quot;]I don&amp;#39;t get very complex very often and so do not completely understand the difference circumstances under which these two should be used.[/quote]&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If a variable is defined as &lt;span style="font-family:courier new,courier;"&gt;$(VARIABLEREF)&lt;/span&gt; in a configuration variable, the definition is stored in MicroStation memory in the same way (not modified or evaluated). It means if in &lt;span style="font-family:courier new,courier;"&gt;VARIABLEREF&lt;/span&gt; another variable is used (e.g. &lt;span style="font-family:courier new,courier;"&gt;MS_DWGSEED&amp;nbsp; : $(_USTN_SYSTEMROOT)seed/seed.dwg&lt;/span&gt;), it&amp;#39;s evaluate every time the variable is used.&lt;br /&gt;This approach is flexible (if referenced variable changes, the variable is changed also) and in my opinion it should be used nearly always.&lt;/li&gt;
&lt;li&gt;If a variable is defined as &lt;span style="font-family:courier new,courier;"&gt;${VARIABLEREF}&lt;/span&gt;, it&amp;#39;s evaluated at first and the result value is stored in MicroStation memory. Consequently if any variable used in the definition changes, the final value will not change, because the definition is forgotten and only the result from the first evaluation is used.&lt;br /&gt;This definition style is &amp;quot;fixed&amp;quot; but also a bit faster (no evaluation every time is done) and is used for definitions that don&amp;#39;t change during MicroStation session. If you will check MicroStation configuration files, the curly brackets are used rarely and only for &amp;quot;base variables&amp;quot; defining different MicroStation folders (e.g. &lt;span style="font-family:courier new,courier;"&gt;_USTN_DATABASECFG = ${_USTN_DATABASE}${_USTN_DATABASENAME}.cfg&lt;/span&gt;). These folder are fixed (so no reason to reevaluate them) and also are referenced by many others variables (so there is some performance saving if they will be not reevaluated every time).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My personal recommendation is to use &lt;span style="font-family:courier new,courier;"&gt;$()&lt;/span&gt; style definition everywhere. Only if there is something very fixed (like definition of folders of e.g. installed application), it makes sense to use &lt;span style="font-family:courier new,courier;"&gt;${}&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;RKoons&amp;quot;]I am trying to understand when the $ is used and when it is not needed.[/quote]&lt;/p&gt;
&lt;p&gt;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 ;-)&lt;/p&gt;
&lt;p&gt;MicroStation variable is always defined using &lt;span style="font-family:courier new,courier;"&gt;$()&lt;/span&gt;, so if more variables should be merged together, it should look like this &lt;span style="font-family:courier new,courier;"&gt;$()$()&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;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 &lt;span style="font-family:courier new,courier;"&gt;WORKSETEXT = ext (_USTN_WORKSETCFG)&lt;/span&gt;, which returns a file extension, so in this case &lt;span style="font-family:courier new,courier;"&gt;ext()&lt;/span&gt; function will return probably &lt;span style="font-family:courier new,courier;"&gt;.cfg&lt;/span&gt; as a result (example taken from CONNECT Edition, I think WORKSETEXT does not exist in V8i).&lt;/p&gt;
&lt;p&gt;I hope it helps a bit :-)&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>