<?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: Boolean Weirdness in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144931#M13592</link>
    <description>Erich, thanks for the explanation. That makes perfect sense as you described it. I thought it might be something like that.&lt;BR /&gt;
&lt;BR /&gt;
Roberto, thanks for the clever solution. I'm going to pop it into the script today! Fortunately I only needed two instances of 'Thing' so it was easy to simply redo the boolean script and renumber the Group definitions. However, it's good to see your solution for future reference.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,</description>
    <pubDate>Mon, 13 May 2013 02:46:54 GMT</pubDate>
    <dc:creator>Vitruvius</dc:creator>
    <dc:date>2013-05-13T02:46:54Z</dc:date>
    <item>
      <title>Boolean Weirdness</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144928#M13589</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I created a GOSUB as follows:&lt;BR /&gt;
&lt;BR /&gt;
35:  !!! Thing&lt;BR /&gt;
&lt;BR /&gt;
   GROUP 'Thing 1'&lt;BR /&gt;
       cPRISM_ .......&lt;BR /&gt;
   ENDGROUP&lt;BR /&gt;
&lt;BR /&gt;
   GROUP 'Thing 2'&lt;BR /&gt;
       cPRISM_ ....&lt;BR /&gt;
   ENDGROUP&lt;BR /&gt;
&lt;BR /&gt;
   result = SUBGROUP('Thing 1', 'Thing 2')&lt;BR /&gt;
   PLACEGROUP result&lt;BR /&gt;
   KILLGROUP 'Thing 1'&lt;BR /&gt;
   KILLGROUP 'Thing 2'&lt;BR /&gt;
&lt;BR /&gt;
   !!! Thing 3&lt;BR /&gt;
       cPRISM_ .......&lt;BR /&gt;
RETURN&lt;BR /&gt;
&lt;BR /&gt;
When I place 35: it works. But when I call a second placement of 35: to a new position all that shows up is 'Thing 3' - the Boolean stuff just doesn't appear.&lt;BR /&gt;
&lt;BR /&gt;
Any thoughts?&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 12 May 2013 02:46:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144928#M13589</guid>
      <dc:creator>Vitruvius</dc:creator>
      <dc:date>2013-05-12T02:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Boolean Weirdness</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144929#M13590</link>
      <description>I find that with group statements, it works best to keep them out of subroutines. Define the group in the main script, go to the subroutine for the geometry then return to the main script to end the group, do your result operations and kill the group. You might try rewriting your script that way to see if it cures your issue.</description>
      <pubDate>Sun, 12 May 2013 05:23:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144929#M13590</guid>
      <dc:creator>Erich</dc:creator>
      <dc:date>2013-05-12T05:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Boolean Weirdness</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144930#M13591</link>
      <description>If you call the 35 subroutine twice, you are trying to define twice the groups 'Thing 1' and 'Thing 2'. That is not allowed by the GDL interpreter, EVEN IF you killed the previous groups. Killing them is only useful to free some memory, but the names can't be reused. &lt;BR /&gt;
 &lt;BR /&gt;
If you don't find other ways to accomplish your needing, try using names defined with some variable. I did it sometime, the past. &lt;BR /&gt;
 &lt;BR /&gt;
There are more elegant solutions, but let try this one: &lt;BR /&gt;
 
&lt;PRE&gt; 
n=1: GOSUB 35  
ADDx 5 
n=2: GOSUB 35 
END 
 
35: !!! Thing  
 
GROUP 'Thing 1'+STR(n,1,0)  
  BLOCK 1,1,1 
ENDGROUP  
 
GROUP 'Thing 2'+STR(n,1,0)  
  BLOCK .5,.5,1 
ENDGROUP  
 
result = SUBGROUP('Thing 1'+STR(n,1,0), 'Thing 2'+STR(n,1,0))  
PLACEGROUP result  
KILLGROUP 'Thing 1'+STR(n,1,0)  
KILLGROUP 'Thing 2'+STR(n,1,0) 
 
!!! Thing 3  
BLOCK 2,2,.1  
RETURN  
&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 May 2013 10:34:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144930#M13591</guid>
      <dc:creator>rocorona</dc:creator>
      <dc:date>2013-05-12T10:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Boolean Weirdness</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144931#M13592</link>
      <description>Erich, thanks for the explanation. That makes perfect sense as you described it. I thought it might be something like that.&lt;BR /&gt;
&lt;BR /&gt;
Roberto, thanks for the clever solution. I'm going to pop it into the script today! Fortunately I only needed two instances of 'Thing' so it was easy to simply redo the boolean script and renumber the Group definitions. However, it's good to see your solution for future reference.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,</description>
      <pubDate>Mon, 13 May 2013 02:46:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Boolean-Weirdness/m-p/144931#M13592</guid>
      <dc:creator>Vitruvius</dc:creator>
      <dc:date>2013-05-13T02:46:54Z</dc:date>
    </item>
  </channel>
</rss>

