cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL Parametric Scripting Problem

toman311
Enthusiast
So, I made a parametric door using GDL script for a project. I placed a door into the project and I imported my GDL door into the Embedded Library. After that, I chose to use a Custom Door Leaf and picked my parametric GDL door. The problem is that my custom door leaf comes in as the size I parametrically modeled it and doesn't adjust like I thought it would if I changed the door size. Why doesn't this work this way and is there any way I can get my custom GDL door leaf to do what I have described?
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
8 REPLIES 8
Erwin Edel
Rockstar
Use the default width, length and height parameters as follows and you are set:

A = leaf width
B = leaf height
zzyzx = leaf thickness

So if you are looking at the panel in 3D window of the object:
x-axis is the width
y-axis is the height
z-axis is the thickness

Depending on how you scripted your door, you may need to rotate it in the 3D script.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
matjashka
Advocate
Everything that Erwin said above, plus:

After you script your own parametric door leaf, once you call it in the Door you basically have no access to modify any of the parameters, and the Door on the plan will mostly pass A, B and ZZYZX down to the leaf. Some Doors scripts may be written to pass more parameters down to the custom door leaf, like finish and material, I haven't had much success with that in older versions and haven't tried any new tricks since.

Your door leaf must rely mostly on those three to auto-adjust other proportions -- in other words, all the panels or glass/muntin spacing in the leaf depend mainly on A and B, and then some ZZYZX.
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
Barry Kelly
Moderator
Sometimes it is easier to just create a door from slabs in plan and then save as a door component object.
Then it will scale automatically with you door frame object.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
toman311
Enthusiast
Thanks, this is very useful.
We use an exact same custom door many times, so I thought I would GDL script it and put it in our library. I guess I could also put it in a project file to copy and paste out of too. We actually have two custom doors we use many times. I just want it to scale proportionally with the changes in sizes. Plus, the parametric abilities of the GDL will help when adjusting the horizontal parts of the door.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
toman311
Enthusiast
matjashka wrote:
Everything that Erwin said above, plus:

After you script your own parametric door leaf, once you call it in the Door you basically have no access to modify any of the parameters, and the Door on the plan will mostly pass A, B and ZZYZX down to the leaf. Some Doors scripts may be written to pass more parameters down to the custom door leaf, like finish and material, I haven't had much success with that in older versions and haven't tried any new tricks since.

Your door leaf must rely mostly on those three to auto-adjust other proportions -- in other words, all the panels or glass/muntin spacing in the leaf depend mainly on A and B, and then some ZZYZX.
I just tried to test this and it seems that I can adjust any parametric parameters that I set up in the GDL script in addition to the A, B, and zzyzx dimensions.
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
matjashka
Advocate
I just tried to test this and it seems that I can adjust any parametric parameters that I set up in the GDL script in addition to the A, B, and zzyzx dimensions.
...within the door leaf itself, but typically not from the door where that custom leaf has been placed.
Unless the door object is scripted to pass those parameters down to the CALLed custom leaf, like in the case of default libraries and predefined door leaves. That's why it's best to rely on A, B and ZZYZX and make the custom door leaf act in a smart way based on these three, as much as you can.
Matt Krol [LinkedIn]
BHMS Architects and Planners, Chicago
AC 10 ... 26 USA
toman311
Enthusiast
Ah, I see. I guess the reason I am able to adjust is because I saved the GDL object as a door. I original tried to do the Custom Door Leaf, than I experimented with just a door. It seems if I want it to be a door with casing, I got some learning to do...
>ArchiCAD 23, 7000 USA FULL

>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
Erwin Edel
Rockstar
If you are not afraid to edit a bit of GDL, it is very easy to just list the parameters at the top of your script.

I typically use some actual variable parameters for the surfaces. As these don't get passed on to the custom leaf (sadly!!).

Any parameters to do with proportions of trims, panels etc I just put in the 3d script at the top so I can adjust them as needed from the script.

Below is a custom panel that works fine. You just need to set the object's subtype to custom door leaf for it to get recognized by doors from the library.

For this one I use two parameters for surfaces 'mat1' (glass) and 'mat2' (the leaf colour inside and outside).

Some of the listed parameters are old and no longer needed, as these panels have been kicking about in our library for many years over many versions of ArchiCAD and from when the Dutch version was using their own library parts. I just can't be bothered trimming it down.
addx a/2
c=zzyzx
ddd=c


a=a
b=b
!v=d
!mat1=e
!handtype=f
!g=g
!mat2=g


tsz=0
roehor=2
roever=3
links=0.150
rechts=0.150
bov=0.150
ond=0.285
tus=0.180
mid=1.100
paneelrandbuiten=0.010
paneelrand=0.060
paneelrandraam=0.040
raamb=0.056
raambov=0.499
raamond=1.652
glaslat=0.030

material mat2

!! hoofdvorm
prism_   10, ddd,
	-a/2, 0, 15,
	 a/2, 0, 15,
	 a/2, b, 15,
	-a/2, b, 15,
	-a/2, 0, -1,

!! gat in hoofdvorm
	-a/2+links, ond, 15,
	 a/2-rechts, ond, 15,
	 a/2-rechts, b-bov, 15,
	-a/2+links, b-bov, 15,
	-a/2+links, ond, -1

!! binnenste paneel
prism_  10, ddd,
	-a/2+links+paneelrand,ond+paneelrand, 15,
	 a/2-(rechts+paneelrand),ond+paneelrand, 15,
	 a/2-(rechts+paneelrand), b-bov-paneelrand, 15,
	-a/2+links+paneelrand, b-bov-paneelrand, 15,
	-a/2+links+paneelrand,ond+paneelrand, -1,

!! gat in paneel
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, 15,
	 raamb/2+glaslat+paneelrandbuiten+paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, 15,
	 raamb/2+glaslat+paneelrandbuiten+paneelrandraam, b-raambov+glaslat+paneelrandbuiten+paneelrandraam, 15,
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, b-raambov+glaslat+paneelrandbuiten+paneelrandraam, 15,
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, -1

!! rand raam
prism_  10, ddd,
	-raamb/2-glaslat-paneelrandbuiten, raamond-glaslat-paneelrandbuiten, 15,
	 raamb/2+glaslat+paneelrandbuiten, raamond-glaslat-paneelrandbuiten, 15,
	 raamb/2+glaslat+paneelrandbuiten, b-raambov+glaslat+paneelrandbuiten, 15,
	-raamb/2-glaslat-paneelrandbuiten, b-raambov+glaslat+paneelrandbuiten, 15,
	-raamb/2-glaslat-paneelrandbuiten, raamond-glaslat-paneelrandbuiten, -1,

!! gat in paneel
	-raamb/2-paneelrandbuiten, raamond-paneelrandbuiten, 15,
	 raamb/2+paneelrandbuiten, raamond-paneelrandbuiten, 15,
	 raamb/2+paneelrandbuiten, b-raambov+paneelrandbuiten, 15,
	-raamb/2-paneelrandbuiten, b-raambov+paneelrandbuiten, 15,
	-raamb/2-paneelrandbuiten, raamond-paneelrandbuiten, -1


addz 0.0125

!! verdiepte rand paneel
prism_ 10, ddd-0.025,
	-a/2+links+paneelrandbuiten, ond+paneelrandbuiten, 15,
	 a/2-rechts-paneelrandbuiten, ond+paneelrandbuiten, 15,
	 a/2-rechts-paneelrandbuiten, b-bov-paneelrandbuiten, 15,
	-a/2+links+paneelrandbuiten, b-bov-paneelrandbuiten, 15,
	-a/2+links+paneelrandbuiten, ond+paneelrandbuiten, -1,


	-a/2+links+paneelrand,ond+paneelrand, 15,
	 a/2-(rechts+paneelrand),ond+paneelrand, 15,
	 a/2-(rechts+paneelrand), b-bov-paneelrand, 15,
	-a/2+links+paneelrand, b-bov-paneelrand, 15,
	-a/2+links+paneelrand,ond+paneelrand, -1

!! raam
material mat1
prism_ 5, ddd-0.025,
	-raamb/2, raamond, 15,
	 raamb/2, raamond, 15,
	 raamb/2, b-raambov, 15,
	-raamb/2, b-raambov, 15,
	-raamb/2, raamond, -1

material mat2
del 1

addz -0.005

!! buitenste rand paneel
prism_ 10, ddd+0.01,
	-a/2+links, ond, 15,
	 a/2-rechts, ond, 15,
	 a/2-rechts, b-bov, 15,
	-a/2+links, b-bov, 15,
	-a/2+links, ond, -1,


	-a/2+links+paneelrandbuiten,ond+paneelrandbuiten, 15,
	 a/2-(rechts+paneelrandbuiten),ond+paneelrandbuiten, 15,
	 a/2-(rechts+paneelrandbuiten), b-bov-paneelrandbuiten, 15,
	-a/2+links+paneelrandbuiten, b-bov-paneelrandbuiten, 15,
	-a/2+links+paneelrandbuiten,ond+paneelrandbuiten, -1

!! brede rand raam
prism_ 10, ddd+0.01,
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, 15,
	 raamb/2+glaslat+paneelrandbuiten+paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, 15,
	 raamb/2+glaslat+paneelrandbuiten+paneelrandraam, b-raambov+glaslat+paneelrandbuiten+paneelrandraam, 15,
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, b-raambov+glaslat+paneelrandbuiten+paneelrandraam, 15,
	-raamb/2-glaslat-paneelrandbuiten-paneelrandraam, raamond-glaslat-paneelrandbuiten-paneelrandraam, -1,


	-raamb/2-glaslat-paneelrandbuiten, raamond-glaslat-paneelrandbuiten, 15,
	 raamb/2+glaslat+paneelrandbuiten, raamond-glaslat-paneelrandbuiten, 15,
	 raamb/2+glaslat+paneelrandbuiten, b-raambov+glaslat+paneelrandbuiten, 15,
	-raamb/2-glaslat-paneelrandbuiten, b-raambov+glaslat+paneelrandbuiten, 15,
	-raamb/2-glaslat-paneelrandbuiten, raamond-glaslat-paneelrandbuiten, -1


!! rand raam
prism_ 10, ddd+0.01,
	-raamb/2-paneelrandbuiten, raamond-paneelrandbuiten, 15,
	 raamb/2+paneelrandbuiten, raamond-paneelrandbuiten, 15,
	 raamb/2+paneelrandbuiten, b-raambov+paneelrandbuiten, 15,
	-raamb/2-paneelrandbuiten, b-raambov+paneelrandbuiten, 15,
	-raamb/2-paneelrandbuiten, raamond-paneelrandbuiten, -1,

	-raamb/2, raamond, 15,
	 raamb/2, raamond, 15,
	 raamb/2, b-raambov, 15,
	-raamb/2, b-raambov, 15,
	-raamb/2, raamond, -1

del 1


!! neus
addz ddd
addx a/2
addy 0.01
roty -90
rotz 90

addz 0.017

prism_   5, a-0.034,
	  0, 0, 15,
	  0.07, 0, 15,
	  0.07, -0.005, 15,
	  0.05, -0.02, 15,
	  0, -0.02, 15

del top
end
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5