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

Properties GDL

Anonymous
Not applicable
Hi, I'm trying to write a property GDL that makes the 2D drawing of windows and doors. It will (hopefully) design the elevation with the floor lines (so I can measure the sill height), but I'm stuck at this code:

! draw the elevation
drawing3 -3,90,2
!subtracts the sill height to go to the floor position
add2 0,-WIDO_SILL_HEIGHT
! Draw the first floor line
pen 1
line2 -WIDO_N_RSIDE_WIDTH/2,0,WIDO_N_RSIDE_WIDTH/2,0
! Draw the second floor line
add2 0,-.05
pen 6
line2 -WIDO_N_RSIDE_WIDTH/2,0,WIDO_N_RSIDE_WIDTH/2,0
add2 0,-.1
! Draw the third floor line
pen 6
line2 -WIDO_N_RSIDE_WIDTH/2,0,WIDO_N_RSIDE_WIDTH/2,0
pen 1
del top

Problem: it doesn't acquire the width of the window/door. What am I doing wrong?
12 REPLIES 12
Anonymous
Not applicable
Hello,

In the property object 2D-code you have the DRAWING3 multiple times and cut the main object when needed. I used a free users' global S_ to tell the main object which loop is going on.

Fox example;

!--------------------------------property object 2D-code
for xx=1 to 2
S_=xx
drawing3 3, 270, 2
add2 2*a, 0
next xx
del 2

!--------------------------------




!--------------------------------main object 3D-code
!--this must be in the beginning
if (GLOB_CONTEXT=6 | GLOB_CONTEXT=46) & S_=2 then
addz 1
cutplane
del 1
endif



....all your cutted 3D-code here...


!--ending the cut
if (GLOB_CONTEXT=6 | GLOB_CONTEXT=46) & S_=2 then cutend

!---------------------------------



Hope this helps.
Anonymous
Not applicable
Just a little problem. I'm not changing the object 3d Code (I would have to change all codes of every window and door I have - and the coming ones). So I have to make alterations only at the property code, which belongs to my system.
Probably I'll have to discharge the section on the list.
Laszlo Nagy
Community Admin
Community Admin
If you do not change the 3D Script, then I do not have any idea of how you are going to have a cut and a non-cut version of the same element in the same list.
Maybe you come up with something extraordinary, but I do not have any other idea at the moment.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28