cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Graeme
Contributor

CYLIND negative value is there a workaround?

I have an object that has worked fine for years until I have come across this Project where the ground level is mostly below the flood plane ie. it is a negative number. Problem is my simple little Inspection Chamber object doesn't like a negative number when creating the Chamber.

 

So for example my Basement is  -1.750 and my Ground Floor is 0.000

 

So my object uses the 

CLIL = SYMB_POS_Z - IL

CLIL (Cover Level to Invert Level) is what height the object was inserted at (with Gravity used when placing the object on the topo mesh). However GDL can't make the Cylinder shape  because in this case its trying to use a negative value.

 

!==========================
1:
MATERIAL "Paint - Dark Gray"
CYLIND CLIL,icdia/2
MATERIAL "C01"
ADD 0,0,CLIL -0.060
CYLIND CLIL,icdia/2
DEL 1

RETURN
!==========================

Any suggestions or strategies on how I can work around this issue? Nothing is jumping out at me by way of a Function to temporarily make the negative number into a positive number. TIA

 

Operating system used: Windows 11 25H2 26200.7840

ArchiCAD 3.4 - 28
Windows 11
1 Solution

Accepted Solutions
Yves
Expert
CYLIND ABS(CLIL),icdia/2
Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13

Go to post

3 Replies 3
Yves
Expert
CYLIND ABS(CLIL),icdia/2
Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13
Graeme
Contributor

Magic thank you that sorted it.

ArchiCAD 3.4 - 28
Windows 11
Patrick M
Ace

I see you caught a solution... and Im not a GDL wizard, but any time I need a length parameter to never be negative, I set a master script:
IF lengthparametername < .001 THEN lengthparametername = .001 ELSE ENDIF

BIM solutions and trouble shooting (self proclaimed) expert. Using Archicad 26 5002 US on Mac OS 11.5.2

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!