BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

About building parametric objects with GDL.

Cannot figure out how to get wall radius for label

I need to script a label, that would know radius (also coordinates of radius centre) of the wall. I looked how window knows about it - for that there is special global variable WIDO_ORIG_DIST. But wall's global variables do not have any information about it. Any ideas? Or it's just impossible?

Accepted Solutions
Not applicable
Looks like AC25 has the solution.
New label parameter: LABEL_ASSOC_ELEM_GEOMETRY

radius_of_circle = Arc Length/Subtended Angle in Radians
r = s/θ

Does this now makes sense?

View solution in original post

I have never found the answer either.
I was hoping the radial dimension tool would be a GDL object I could explore, but sadly no.
So I think there is a way to do the math from other values but I haven't had time to look into yet. You would need start, end points (and center maybe) and then a length value.
Or perhaps there is a command I just haven't found it.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
The only once way for solving this problem I found via using label coordinates. By placing label automatically it appears always in the middle of the wall. Then I have wall start point, wall arc middle point, chord direction and length of arc. This information would be enough to get formula finding radius and centre of radius.
But the only problem here - if I'm placing label manually (not in the middle of the wall arc) it will calculate wrong radius, also if I'm modifying wall radius, length or position of the end point - it will give me wrong radius.
But there is no another possibility, probably.
Barry Kelly
The 'Moldings and Panel' wall accessory works on curved walls.
Having a quick look at the scripts, it uses 'ac_wall_radius'.

So 'ac_wall_radius' will read the radius of the wall for you if you can use that in your label.

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
Barry wrote:
The 'Moldings and Panel' wall accessory works on curved walls.
Having a quick look at the scripts, it uses 'ac_wall_radius'.

So 'ac_wall_radius' will read the radius of the wall for you if you can use that in your label.

No, I cannot. Wall accessory passing to the GDL object parameters values via Add-on (all information about wall geometry). There is no connection between label and Add-on. If I just set new parameter variable AC_wall_radius in label it will return me zero.
Not applicable
I noticed that WALL_POSITION[1] gives the chord length of the arc. That with WALL_DIRECTION gives us the real cord length. With this and WALL_LENGTH_A (Arc length) we can get the wall radius thru
Does this makes sense?
No. WALL_POSITION means wall position - coordinates x,y,z. Wall position cannot give arc chord length.
Braza wrote:

Is that a new variable in AC24/25? It is not available in AC23...


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
Screen shot from AC17 GDL manual.
Guys, what's wrong here is happening?
Not applicable
Yes. WALL_POSITION long exists.
But I did a test with a dummy label with WALL_POSITION[1] AND [2] text2.
Noticed that the arc is always counterclockwise although the origin straight wall was from left to right.
Perhaps it is just luck. But it gives you the chord length. Though if I move the wall to the negative side of the origin it will give a different value...
Just turning some rocks.

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!