We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

GDL "beam" vs ArchiCad beam

Hubert Wagner
Participant
Hello :
I've created a "beam" using GDL. The advantages are as follows :
I can define a stub tenon and a second tenon on each end a define their dimensions and offset.
I can enter the building module, the number of modules and plus or minus extra length each end.
This allows me to put in a beam and resize it very quickly and precisely.
Unfortunately, I can't find a way to extract the length of the beam from the DB

On the other hand, the standard Archicad beam allows me to extract the length but without the bells and whistles.

Can someone suggest how I set up the GDL to get the length of the "beam" object"?

Putting a calculated parameter into the GDL script might work if I could access it from the BOM setup. I've not found a way to do that.

Regards : Hubert Wagner
6 REPLIES 6
sinceV6
Advocate
Hi.
Are you trying to get the length in schedules?
You could use the PARAMETERS keyword (either in Master script or Parameters script) to pass the beam length info to a parameter in the parameter list. Then you can schedule it using the "additional parameters" button when adding fields in the schedule.

Something like:
In parameter list, create a parameter for listings; maybe:
beam_length

Write:
PARAMETERS beam_length = A !<--- or whatever calculated value has your beam length

Then find the beam_length parameter in the schedule fields.

Best regards.
Hubert Wagner
Participant
Hello :
Thank you for this assistance. Everything works.

The point of the exercise is to be able to choose a new beam (or column) object where the building module, column dimension, tenon lengths etc are all predefined and then merely snap it into position.

I find the regular posts and beams fiddly to place and edit.

Regards : Hubert Wagner
Hubert Wagner
Participant
Hello :
I spoke too soon.
It appears the parameter value doesn't update. Sometimes it works but the final value always shows an extra amount. At other times the parameter sticks at an old value regardless of the settings.

I don't see any error in the logic of my code.

I've noticed also that pasting into the GDL window creates gross errors in the text. This tends to suggest the update problem might be a bug as well.

Regards : Hubert Wagner
Hubert Wagner
Participant
Hello :
Here is the essential code for this object. There is more but not relevant to the calculation of the totalLength.
I welcome all comments.
I'll post the script if anyone is interested.

Regards : Hubert Wagner

Parameters :
A = 0
B = 10
ZZYZX = 15
theMod = 130 !(building module in cm)
numMod = 1 !(the number of modules)
extraLth = 0 !(extra length added to each end)
pwcm = 0 !(the section of the column in cm)
leftTenon = false
lTdx = 10 !(the length of the left tenon)
rightTenon = false
rTdx = 10 !(the length of the right tenon)
totalLength as a length

Master script :
dX = A
dY = B
dZ = ZZYZX

pw = pwcm/100 !(convert to m)

if dX > 0 then ! choose length entered or calculate modular length
beamLth = dX
else
beamLth = ((theMod/100) * numMod) + (extraLth/100 * 2) - pw
! values converted to meters
endif

Parameter script :

PARAMETERS
totalLength = beamLth
! if leftTenon then totalLength = totalLength + lTdx
! if rightTenon then totalLength = totalLength + rTdx

totalLength shown in Parameters = 194 even if the actual length (A) is set to say 100.
Hubert Wagner
Participant
Hello :
It appears this problem may be self-inflicted.
As usual settling down to describe the problem as precisely as possible revealed the error.

One error : I placed the code for the PARAMETERS line below the first line.

I hope I've not wasted anyone's time.

Regards : Hubert Wagner
sinceV6
Advocate
Hi.
I'm sorry I didn't see this sooner. So you finally solved the issue?