<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: extra_accuracy_string in STR{2} in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35621#M35789</link>
    <description>Thanks to Gerd and Jochen, who brought me on track.&lt;BR /&gt;
&lt;BR /&gt;
I thought the &lt;B&gt;extra_accuracy_string&lt;/B&gt; would be an additional format string, but it is a &lt;B&gt;return&lt;/B&gt; (!) string. It returns the exponent, which has to be printed after the return value of the function. To return anything inside the format string it has to be 'told' to the STR{2} function, that it has to calculate the exponent and the intervals for this. Is there no exponent, because it's zero, the value is an empty string. The 'exponent# is no real exponent, it is the rounded part after (!) the last decimal places, which is changed to string.&lt;BR /&gt;
&lt;BR /&gt;
For this the format string has the configuration:&lt;BR /&gt;
&lt;BR /&gt;
"%[flags]&lt;FONT color="red"&gt;[accuracy]&lt;/FONT&gt;[min._#_of_chars][.decimal_places][conversion_unit]"&lt;BR /&gt;
&lt;BR /&gt;
And [accuracy] can be "*0", "*1", "*2", "*3" and "*4". See manual.&lt;BR /&gt;
&lt;BR /&gt;
e.g.  "%+-*16.1m"   means&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;%&lt;/B&gt; Beginning of string&lt;BR /&gt;
&lt;B&gt;+&lt;/B&gt; Show always algebraic sign&lt;BR /&gt;
&lt;B&gt;-&lt;/B&gt; bounded to left margin (add spaces to the end)&lt;BR /&gt;
&lt;B&gt;*1&lt;/B&gt; Accuracy format&lt;BR /&gt;
&lt;B&gt;6&lt;/B&gt; Min. Number of chars: 6&lt;BR /&gt;
&lt;B&gt;.1&lt;/B&gt; one digit after decimal point&lt;BR /&gt;
&lt;B&gt;m&lt;/B&gt; unit: meters&lt;BR /&gt;
&lt;BR /&gt;
Mention, that "...*16..." can/has to be set without spaces, because the accuracy format is two chars wide. I think for this the star is part of this flag.&lt;BR /&gt;
&lt;BR /&gt;
Puhhh. Hard work with the good old manual. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;</description>
    <pubDate>Wed, 24 Aug 2005 01:25:29 GMT</pubDate>
    <dc:creator>Frank Beister</dc:creator>
    <dc:date>2005-08-24T01:25:29Z</dc:date>
    <item>
      <title>extra_accuracy_string in STR{2}</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35619#M35787</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Can anyone explain how does the thing with
&lt;PRE&gt;STR{2}(format_string, numeric_expression [, exrta_accuracy_string])&lt;/PRE&gt;

work? What values for &lt;B&gt;extra_accuracy_string&lt;/B&gt; are allowed?&lt;BR /&gt;
&lt;BR /&gt;
REQUEST("Linear_dimension" ... returns "%#*1.3m" as formatstring. OK. A star for accuracy, but how to go on?&lt;BR /&gt;
&lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Aug 2005 14:06:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35619#M35787</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-23T14:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: extra_accuracy_string in STR{2}</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35620#M35788</link>
      <description>&lt;PRE&gt;zahl = 12345.4329
tx   = STR ("%#*3 1.2m", zahl) + "m"
TEXT2 0, 0, tx&lt;/PRE&gt;
this causes no error message in the gdl scripts, but the rounding of the number is not made. &lt;BR /&gt;
no idea why. &lt;BR /&gt;
&lt;BR /&gt;
this may gives us an idea, whats going round in the head of the gdl while 2d plan view is created (???)
&lt;PRE&gt;zahl = 12345.4329
tx   = STR{2} ("%#*2 1.2m", zahl, abc) + "m"
TEXT2 0, 0, tx
print abc&lt;/PRE&gt;

maybe someone knows more?&lt;BR /&gt;
best regards, gerd</description>
      <pubDate>Tue, 23 Aug 2005 15:55:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35620#M35788</guid>
      <dc:creator>gerd</dc:creator>
      <dc:date>2005-08-23T15:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: extra_accuracy_string in STR{2}</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35621#M35789</link>
      <description>Thanks to Gerd and Jochen, who brought me on track.&lt;BR /&gt;
&lt;BR /&gt;
I thought the &lt;B&gt;extra_accuracy_string&lt;/B&gt; would be an additional format string, but it is a &lt;B&gt;return&lt;/B&gt; (!) string. It returns the exponent, which has to be printed after the return value of the function. To return anything inside the format string it has to be 'told' to the STR{2} function, that it has to calculate the exponent and the intervals for this. Is there no exponent, because it's zero, the value is an empty string. The 'exponent# is no real exponent, it is the rounded part after (!) the last decimal places, which is changed to string.&lt;BR /&gt;
&lt;BR /&gt;
For this the format string has the configuration:&lt;BR /&gt;
&lt;BR /&gt;
"%[flags]&lt;FONT color="red"&gt;[accuracy]&lt;/FONT&gt;[min._#_of_chars][.decimal_places][conversion_unit]"&lt;BR /&gt;
&lt;BR /&gt;
And [accuracy] can be "*0", "*1", "*2", "*3" and "*4". See manual.&lt;BR /&gt;
&lt;BR /&gt;
e.g.  "%+-*16.1m"   means&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;%&lt;/B&gt; Beginning of string&lt;BR /&gt;
&lt;B&gt;+&lt;/B&gt; Show always algebraic sign&lt;BR /&gt;
&lt;B&gt;-&lt;/B&gt; bounded to left margin (add spaces to the end)&lt;BR /&gt;
&lt;B&gt;*1&lt;/B&gt; Accuracy format&lt;BR /&gt;
&lt;B&gt;6&lt;/B&gt; Min. Number of chars: 6&lt;BR /&gt;
&lt;B&gt;.1&lt;/B&gt; one digit after decimal point&lt;BR /&gt;
&lt;B&gt;m&lt;/B&gt; unit: meters&lt;BR /&gt;
&lt;BR /&gt;
Mention, that "...*16..." can/has to be set without spaces, because the accuracy format is two chars wide. I think for this the star is part of this flag.&lt;BR /&gt;
&lt;BR /&gt;
Puhhh. Hard work with the good old manual. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_sad.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 24 Aug 2005 01:25:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35621#M35789</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2005-08-24T01:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: extra_accuracy_string in STR{2}</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35622#M35790</link>
      <description>Hi Frank,&lt;BR /&gt;
parallel to you I worked on this problem too, because at the moment I need accuracy for some values in my GDL Script. And have created one demo file according your post and Gerd's reply. You are right it was hard  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
P.S. I don't know how well you have solved your own question, but if find something wrong in demo, please reply!</description>
      <pubDate>Wed, 24 Aug 2005 14:32:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/extra-accuracy-string-in-STR-2/m-p/35622#M35790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-24T14:32:08Z</dc:date>
    </item>
  </channel>
</rss>

