Boolean Weirdness
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-05-12 04:46 AM
2013-05-12
04:46 AM
35: !!! Thing
GROUP 'Thing 1'
cPRISM_ .......
ENDGROUP
GROUP 'Thing 2'
cPRISM_ ....
ENDGROUP
result = SUBGROUP('Thing 1', 'Thing 2')
PLACEGROUP result
KILLGROUP 'Thing 1'
KILLGROUP 'Thing 2'
!!! Thing 3
cPRISM_ .......
RETURN
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.
Any thoughts?
Cheers
Cameron Hestler, Architect
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-05-12 07:23 AM
2013-05-12
07:23 AM
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.
Erich
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-05-12 12:34 PM
2013-05-12
12:34 PM
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.
If you don't find other ways to accomplish your needing, try using names defined with some variable. I did it sometime, the past.
There are more elegant solutions, but let try this one:
If you don't find other ways to accomplish your needing, try using names defined with some variable. I did it sometime, the past.
There are more elegant solutions, but let try this one:
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
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2013-05-13 04:46 AM
2013-05-13
04:46 AM
Erich, thanks for the explanation. That makes perfect sense as you described it. I thought it might be something like that.
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.
Cheers,
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.
Cheers,
Cameron Hestler, Architect
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma