Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

optional hole in prism command

Aussie John
Newcomer
Hi anyone know a trick to script a prism command so that an inserted hole is on or off? Making a zero sized hole obviously gives an error

thanks
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
9 REPLIES 9
David Larrew
Booster
I would use GET/ PUT to define and call the two different PRISM coordinates.
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Aussie John
Newcomer
thanks David- can you direct me to an example?
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
David Larrew
Booster
This would be a rough example:

NO_HOLE is a boolean (ON/OFF) parameter
x#, y# are the prism coordinates (with masks)
prism_height is a parameter

If NO_HOLE Then
PUT x1, y1, 1,
x2, y2, 1,
x3, y3, 1,
x4, y4, 1,
x5, y5, -1
Else
PUT x1, y1, 1,
x2, y2, 1,
x3, y3, 1,
x4, y4, 1,
x5, y5, -1,
x6, y6, 1,
x7, y7, 1,
x8, y8, 1,
x9, y9, -1
EndIf

PRISM_ NSP/3, prism_height, GET (NSP)

End

You "PUT" coordinates into the objects buffer, then "GET" the "NSP" (number of stored parameters in the buffer).
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Aussie John
Newcomer
thanks that looks good- have a good xmas
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
David Larrew
Booster
Glad to help.

Thanks, you have a good holiday, also!
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Anonymous
Not applicable
Aussie wrote:
Hi anyone know a trick to script a prism command so that an inserted hole is on or off? Making a zero sized hole obviously gives an error
If you're using AC8, you should have a look at the boolean operation in GDL scripts : it should be even easier to manipulate... (I've never managed very well the PUT and GET command )

have a look at :
http://download.graphisoft.com/ftp/publishing/ac_help/wwhelp/wwhimpl/js/html/wwhelp.htm?href=AC81_NewHelp-31-62.html
Anonymous
Not applicable
Actually, I think you can trim that script a tad.

PUT x1, y1, 1,
x2, y2, 1,
x3, y3, 1,
x4, y4, 1,
x5, y5, -1

If NO_HOLE = 0 Then
PUT x6, y6, 1,
x7, y7, 1,
x8, y8, 1,
x9, y9, -1
EndIf

PRISM_ NSP/3, prism_height, GET (NSP)
David Larrew
Booster
Alex,

As I said "a rough example" to help explain how the GET / PUT works. Remember, we are not on the GDL-Talk list and many GDL questions are coming from users with little to no GDL experience. ... But, yes, your suggestion is a good example of how to streamline one's code.
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Anonymous
Not applicable
This is probably a bit late but use the new cutform comand. It is excelent. Draw your prism, copy the points into the cutform imbedded in an if statment, easy as.