<?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: How do I state GDL units? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226727#M3574</link>
    <description>One should mention that in the GDL editor's parameter list you can have two types, that look similar, but behave differently.&lt;BR /&gt;
One is the length parameter, the other is the "natural number" parameter. Both are represented as floats, so it is not obvious in how they differ.&lt;BR /&gt;
However, the natural number parameter will stay the same no matter the working unit; the length parameter on the other hand will itself present differently to the user – depending on what working unit is set.</description>
    <pubDate>Sun, 29 Aug 2021 16:52:30 GMT</pubDate>
    <dc:creator>runxel</dc:creator>
    <dc:date>2021-08-29T16:52:30Z</dc:date>
    <item>
      <title>How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226723#M3570</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi Guys&lt;BR /&gt;&lt;BR /&gt;Slowly teaching myself the basics of GDL. But one thing that confuses me is object units default to meters.&lt;BR /&gt;So my 450mm chair is 450m, even though my project is set to mm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a command for this? I tried searching the forum but had no luck.&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 06:46:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226723#M3570</guid>
      <dc:creator>henrybs14</dc:creator>
      <dc:date>2021-09-14T06:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226724#M3571</link>
      <description>Length in GDL is in meters. For examle, A=1 means A = 1m = 1000mm. So if you set A=450 its equal 450m=450 000 mm.</description>
      <pubDate>Sat, 28 Aug 2021 09:42:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226724#M3571</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2021-08-28T09:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226725#M3572</link>
      <description>So how do most people deal with this issue? &lt;BR /&gt;
Do they request the working units somehow? or do they run a loop through all their variables first to divide by 1000?&lt;BR /&gt;
&lt;BR /&gt;
Or do most objects just become 0.45 instead of 450, since I see archicad objects work fine, pretty sure i can make 1012mm table too.</description>
      <pubDate>Sun, 29 Aug 2021 02:59:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226725#M3572</guid>
      <dc:creator>henrybs14</dc:creator>
      <dc:date>2021-08-29T02:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226726#M3573</link>
      <description>It's not clear what you're trying to do that is causing difficulty.   Typically, there is nothing to do... the fact that GDL interprets numeric lengths internally as meters isn't something that anyone usually needs to pay attention to.&lt;BR /&gt;
&lt;BR /&gt;
For example, if your Working Units are meters and your parameter A is the chair dimension you want to be 450mm, then you would enter 0.45 for that parameter in the object settings dialog.  If your Working Units are millimeters, you would enter 450.  When the parameter is passed to the object script, the conversion is performed to meters.  Same if an Imperial Units user entered  1'-6" in the object settings dialog (or in the script) ... that would be converted to meters if you were to examine the value received in the object script (0.4572 m).&lt;BR /&gt;
&lt;BR /&gt;
If you are hard-coding your chair to be 450mm, then you would enter 0.45 in your script.&lt;BR /&gt;
&lt;BR /&gt;
In case this isn't clear yet (I'm tired), let's say you have a parameter in your object that defaults to 450mm (so you would have entered it as 0.45 since values are meters inside your script).  In the Object Setting dialog, if your working units are set to mm, that parameter will appear as 450.  If you working units are meters, it will appear as 0.450.</description>
      <pubDate>Sun, 29 Aug 2021 03:20:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226726#M3573</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2021-08-29T03:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226727#M3574</link>
      <description>One should mention that in the GDL editor's parameter list you can have two types, that look similar, but behave differently.&lt;BR /&gt;
One is the length parameter, the other is the "natural number" parameter. Both are represented as floats, so it is not obvious in how they differ.&lt;BR /&gt;
However, the natural number parameter will stay the same no matter the working unit; the length parameter on the other hand will itself present differently to the user – depending on what working unit is set.</description>
      <pubDate>Sun, 29 Aug 2021 16:52:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226727#M3574</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-08-29T16:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226728#M3575</link>
      <description>If you are working with constants in the code, you can use multiplication.&lt;BR /&gt;
INCH = 0.0254&lt;BR /&gt;
MM = 0.001&lt;BR /&gt;
M = 1&lt;BR /&gt;
BLOCK 1 * INCH, 20 * MM, 3 * M&lt;BR /&gt;
&lt;BR /&gt;
On the UI always use Length and Angle parameter types for lengths/angles, their representation change according to the workspace settings.</description>
      <pubDate>Tue, 31 Aug 2021 07:04:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/226728#M3575</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-08-31T07:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I state GDL units?</title>
      <link>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/332844#M3576</link>
      <description>&lt;P&gt;I totally forgot that only the default unit is metre, inch/feet can be used when specified:&lt;/P&gt;
&lt;P&gt;block 1", 1', 1'-1"&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 12:59:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/How-do-I-state-GDL-units/m-p/332844#M3576</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2022-03-21T12:59:09Z</dc:date>
    </item>
  </channel>
</rss>

