<?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: Inserting Code Into Command (Adding/Subtracting Nodes From Slab) in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/331125#M2562</link>
    <description>&lt;P&gt;So sorry for the delayed response everyone! Work picked up, and I had to set aside the non-billable GDL work (you all know how it is).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are all fantastic suggestions. It's really great to have such an active community for such a niche topic! I've got some tinkering to do, but should have everything I need to get started.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;</description>
    <pubDate>Sun, 27 Feb 2022 21:47:51 GMT</pubDate>
    <dc:creator>Benji_W</dc:creator>
    <dc:date>2022-02-27T21:47:51Z</dc:date>
    <item>
      <title>Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329811#M2556</link>
      <description>&lt;P&gt;I apologize for not knowing how to word the title properly – still starting out with GDL. I just need pointed in the right direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I'm creating a SLAB in GDL. And let's say that I want to create a variable number of nodes (n = &lt;EM&gt;variable&lt;/EM&gt;). Obviously, if I change the number of nodes from 3 to 4, then AC is going to be looking for 3 additional parameters (x4, y4, z4) which aren't there. Or, if reducing the number of nodes, then it will see too many parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the best approach for inserting/removing these additional/unnecessary parameters?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a related note: Is it possible to somehow insert a few lines of code halfway through a command, and have AC recognize the inserted lines as part of the command? My first thought to resolve this issue was to use a GOSUB within the SLAB command (after defining the number of nodes and height, but prior to defining the xyz coordinates of the individual nodes) that would insert the desire list of parameters (including commas and all), but &lt;EM&gt;"Keywords can't be used as variables".&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks In Advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 18:11:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329811#M2556</guid>
      <dc:creator>Benji_W</dc:creator>
      <dc:date>2022-02-13T18:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329833#M2557</link>
      <description>&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;For adding nodes you use "dynamic array" parameters. Any parameter can be made into an array by turning on the array function.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Arrays.png" style="width: 651px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/19078iFC67026C07F6C107/image-size/large?v=v2&amp;amp;px=999" role="button" title="Arrays.png" alt="Arrays.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can have 1D or 2D arrays; 1D being a 1 column with multiple rows of values and 2D being multiple columns and rows. The examples above are both 2D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You then set this array to grow and shrink based on the number of nodes by using a loop statement in the master/parameter script. Using the values in the image above would look like this (note I have 6 columns but you only need 3 (x, y, z)) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;xNde = 1&lt;/P&gt;&lt;P&gt;yNde = 2&lt;/P&gt;&lt;P&gt;zNde = 3&lt;/P&gt;&lt;P&gt;dim _nodes_MuPr_2[][]&lt;/P&gt;&lt;P&gt;for i = 1 to qNodes_MuPr_2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if i &amp;gt; vardim1(nodes_MuPr_2) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][xNde] =&amp;nbsp;0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][yNde] =&amp;nbsp;0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][zNde] =&amp;nbsp;0&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][xNde] =&amp;nbsp;nodes_MuPr_2[i][xNde]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][yNde] =&amp;nbsp;nodes_MuPr_2[i][yNde]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _nodes_MuPr_2[i][zNde] =&amp;nbsp;nodes_MuPr_2[i][zNde]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; endif&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;P&gt;nodes_MuPr_2 = _nodes_MuPr_2&lt;/P&gt;&lt;P&gt;parameters&amp;nbsp;nodes_MuPr_2 = nodes_MuPr_2&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 22:57:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329833#M2557</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2022-02-13T22:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329843#M2558</link>
      <description>&lt;P&gt;If you download one of the objects in my signature you can experiment. The top and bottom shapes are all likes this in the objects.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 02:22:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329843#M2558</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2022-02-14T02:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329890#M2559</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Benji_W&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;BR /&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;This should work. You just use put and get.&lt;/DIV&gt;&lt;DIV class=""&gt;You may add or remove lines. Nsp is the number of puts, so the number of nodes is nsp/3.&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x1=0.0 : y1=0.0&lt;/P&gt;&lt;P&gt;x2=1.0&amp;nbsp;: y2=0.0&lt;/P&gt;&lt;P&gt;x3=1.0&amp;nbsp;:&amp;nbsp;y3=1.0&lt;/P&gt;&lt;P&gt;x4=0.0 : y4=1.0&lt;/P&gt;&lt;P&gt;put&amp;nbsp; x1 , y1 , 15,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x2 , y2 , 15,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x3 , y3 , 15,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x4 , y4 , 15&lt;/P&gt;&lt;P&gt;prism_&amp;nbsp; nsp/3, 1 , get(nsp)&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 10:07:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329890#M2559</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2022-02-14T10:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329891#M2560</link>
      <description>&lt;P&gt;Could you utilise the Dynamic Polyline object floating around on here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.graphisoft.com/t5/Developer-forum/Dynamic-Polyline-base-code-object-VERSION-2/m-p/249973" target="_blank"&gt;https://community.graphisoft.com/t5/Developer-forum/Dynamic-Polyline-base-code-object-VERSION-2/m-p/249973&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 10:34:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329891#M2560</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2022-02-14T10:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329893#M2561</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 11:37:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/329893#M2561</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2022-02-14T11:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Code Into Command (Adding/Subtracting Nodes From Slab)</title>
      <link>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/331125#M2562</link>
      <description>&lt;P&gt;So sorry for the delayed response everyone! Work picked up, and I had to set aside the non-billable GDL work (you all know how it is).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are all fantastic suggestions. It's really great to have such an active community for such a niche topic! I've got some tinkering to do, but should have everything I need to get started.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;</description>
      <pubDate>Sun, 27 Feb 2022 21:47:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inserting-Code-Into-Command-Adding-Subtracting-Nodes-From-Slab/m-p/331125#M2562</guid>
      <dc:creator>Benji_W</dc:creator>
      <dc:date>2022-02-27T21:47:51Z</dc:date>
    </item>
  </channel>
</rss>

