BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
GDL
About building parametric objects with GDL.
SOLVED!

Multiply by Boolean? Interpreting Equation in Equation?

Lingwisyer
Guru
_doorHeight = _panelHeight + frameWidth*(iFrameType = FRAME_WIRE)


This line is from one of the broken GS AC23 objects. Anyone know how the highlighted section works? Changing the Equal to a Not Equal fixes two of the options, but doubles the issue in the third.

When GS rewrites an object, not adding anything, as far as I can tell, and breaks part of it...



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
the highlighted section is returning a true or false value (1 or 0).
therefore the frame width is only added to the door height if the frame type is wire
therefore the "frameWidth" is only added to the "_doorHeight" if the "iFrameType" is "FRAME_WIRE"
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists

View solution in original post

3 REPLIES 3
Barry Kelly
Moderator
What object are you looking at?


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Solution
the highlighted section is returning a true or false value (1 or 0).
therefore the frame width is only added to the door height if the frame type is wire
therefore the "frameWidth" is only added to the "_doorHeight" if the "iFrameType" is "FRAME_WIRE"
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Lingwisyer
Guru
Ah. Thanks Kristian.

So in this case, since changing the requisite to false solves the two false cases and doubles the true case, the equation should be a subtraction of frameWidth instead of addition. Simple fix, now just to wait for a licence to become available to use...

@Barry, Wardrobe Modular



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Learn and get certified!

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!