<?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: gdl unit of text in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322256#M2258</link>
    <description>&lt;P&gt;This is a great answer if you're trying to accommodate multiple different disciplines!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 01:51:15 GMT</pubDate>
    <dc:creator>SenecaDesignLLC</dc:creator>
    <dc:date>2021-11-22T01:51:15Z</dc:date>
    <item>
      <title>gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322188#M2249</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a newbie in coding. sometimes i try to cook something but i end up spoiling the broth. i spent the last 30min reading the gdl editor on strings and integers but that thing is way to complex for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to change the units of the value of AxB but i cant seem to find it.&lt;/P&gt;
&lt;P&gt;this is my object and now the area, which is no more than AxB is in millimiter but i want it in meters&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lmcardoso_0-1637520533026.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/16321iB507FD90ECC738BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lmcardoso_0-1637520533026.png" alt="lmcardoso_0-1637520533026.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;this is my code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;set line_type ln01&lt;BR /&gt;pen pen01&lt;BR /&gt;fill fill01&lt;BR /&gt;poly2_b{5} 5, 3, 0, pen01, pen02, pen03,&lt;BR /&gt;0, 0, 1, 0, 0, 1, 0,&lt;BR /&gt;0, 0, 1,&lt;BR /&gt;A, 0, 1,&lt;BR /&gt;A, B, 1,&lt;BR /&gt;0, B, 1,&lt;BR /&gt;0, 0, 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;define style{2} "AC_STYLE_1" "Arial", txsz , 0&lt;BR /&gt;&lt;BR /&gt;paragraph "AC_PRG_7" 2, 0, 0, 0, 1&lt;BR /&gt;pen 1&lt;BR /&gt;set style "AC_STYLE_1"&lt;BR /&gt;""+"&amp;lt; "+STR(1000*A,1,0)+" &amp;gt;"&lt;BR /&gt;endparagraph&lt;BR /&gt;textblock "AC_TEXTBLOCK_7" 0, 5, 0, 1, 1, 1,&lt;BR /&gt;"AC_PRG_7"&lt;BR /&gt;richtext2 A/2, .2, "AC_TEXTBLOCK_7"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;paragraph "AC_PRG_8" 2, 0, 0, 0, 1&lt;BR /&gt;&lt;BR /&gt;""+"&amp;lt; "+STR(1000*B,1,0)+" &amp;gt;"&lt;BR /&gt;endparagraph&lt;BR /&gt;textblock "AC_TEXTBLOCK_8" 0, 5, 90, 1, 1, 1,&lt;BR /&gt;"AC_PRG_8"&lt;BR /&gt;richtext2 0.2, B/2, "AC_TEXTBLOCK_8"&lt;BR /&gt;&lt;BR /&gt;IF txt01=1 THEN&lt;BR /&gt;DEFINE STYLE TEXT_1 Arial, txsz , 5 , 0&lt;BR /&gt;SET STYLE TEXT_1&lt;BR /&gt;TEXT2 A/2, B/2, ""+STR(1*A*B,1,0)+"m2"&lt;BR /&gt;ENDIF&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p,s, yeah i guess my code is super complicated ahaha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 14:46:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322188#M2249</guid>
      <dc:creator>lmcardoso</dc:creator>
      <dc:date>2021-11-24T14:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322204#M2250</link>
      <description>&lt;P&gt;you need to use STR{2} so you can set what you are after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also&amp;nbsp; you dont need the "set" for line_type or style to work.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 19:30:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322204#M2250</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2021-11-21T19:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322211#M2251</link>
      <description>&lt;P&gt;thanks seneca, but for me that is still unknow to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried&amp;nbsp;&lt;SPAN&gt;TEXT2 A/2, B/2, ""+STR{2}(1*A*Bsqm,1,0)+"m2"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but it doesnt work...&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 19:45:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322211#M2251</guid>
      <dc:creator>lmcardoso</dc:creator>
      <dc:date>2021-11-21T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322217#M2252</link>
      <description>&lt;P&gt;If you share the object I can help ya get it to work.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 19:54:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322217#M2252</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2021-11-21T19:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322219#M2253</link>
      <description>&lt;P&gt;thanks a lot!! i really appreciate it&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 19:56:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322219#M2253</guid>
      <dc:creator>lmcardoso</dc:creator>
      <dc:date>2021-11-21T19:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322227#M2254</link>
      <description>&lt;P&gt;so maybe i am miss understanding, but if you change the code to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEXT2 A/2, B/2, ""+STR(1000*(A*B),1,0)+"m2"&lt;/P&gt;&lt;P&gt;does this not get what you want?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 20:26:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322227#M2254</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2021-11-21T20:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322232#M2255</link>
      <description>&lt;P&gt;i tried but that no it doesnt solve the problem. I guess its the units that are not right&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what it should appear is 10,8m2 instead of 10800.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on your left a fil showing the area and on the right my object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lmcardoso_0-1637526854813.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/16355i2D6F936691F2796B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lmcardoso_0-1637526854813.png" alt="lmcardoso_0-1637526854813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 20:34:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322232#M2255</guid>
      <dc:creator>lmcardoso</dc:creator>
      <dc:date>2021-11-21T20:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322233#M2256</link>
      <description>&lt;P&gt;okay try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEXT2 A/2, B/2, ""+STR("%.3m",(A*B))+"m2"&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 20:45:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322233#M2256</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2021-11-21T20:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322243#M2257</link>
      <description>&lt;P&gt;Another way, with reading the working units of the project&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;format_string = "%.0" !Defult
n = REQUEST ("Area_dimension", "", format_string)

!! Or
!!n = REQUEST ("Calc_area_unit", "", format_string)

_stUnit = "m"

if strstr (format_string, "mm") &amp;amp; not(_bUnitIsFound) then
	_stUnit 	= " mm"
	_bUnitIsFound  	= 1
endif
if strstr (format_string, "cm") &amp;amp; not(_bUnitIsFound) then
	_stUnit 	= " cm"
	_bUnitIsFound  	= 1
endif
if strstr (format_string, "m") &amp;amp; not(_bUnitIsFound)  then
	_stUnit 	= " m"
	_bUnitIsFound  	= 1
endif
if strstr (format_string, "f") &amp;amp; not(_bUnitIsFound) then
	_stUnit 	= " ft"
	_bUnitIsFound  	= 1
endif
if strstr (format_string, "i") &amp;amp; not(_bUnitIsFound) then
	_stUnit 	= " inch"
	_bUnitIsFound  	= 1
endif

_stUnit = _stUnit + "²"

area_ = A * B

area_txt = str(format_string, area_) + _stUnit&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 22:54:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322243#M2257</guid>
      <dc:creator>kuvbur</dc:creator>
      <dc:date>2021-11-21T22:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322256#M2258</link>
      <description>&lt;P&gt;This is a great answer if you're trying to accommodate multiple different disciplines!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 01:51:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322256#M2258</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2021-11-22T01:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322570#M2259</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/10661"&gt;@lmcardoso&lt;/a&gt;&amp;nbsp;metric GDL coding is in meters by default, so you text should be...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TEXT2 A/2, B/2, "" + STR((A * B), 8, 3) + "m2"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 17:15:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322570#M2259</guid>
      <dc:creator>DGSketcher</dc:creator>
      <dc:date>2021-11-22T17:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: gdl unit of text</title>
      <link>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322589#M2260</link>
      <description>&lt;P&gt;thanks everyone for the input and solutions. it works now !!! wayayayayay&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 18:55:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/gdl-unit-of-text/m-p/322589#M2260</guid>
      <dc:creator>lmcardoso</dc:creator>
      <dc:date>2021-11-22T18:55:25Z</dc:date>
    </item>
  </channel>
</rss>

