Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot figure out how to get wall radius for label

Podolsky
Newcomer
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?
1 ACCEPTED SOLUTION

Solution
Braza
Newcomer
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?
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

View solution in original post

21 REPLIES 21

Braza
Newcomer
Thanks Dominic.
I see that you properly defined the dictionary. No errors.
The test I did gave me some errors probably due to the lack of dict definition.
Cheers,
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Peter Baksa
Graphisoft
Graphisoft
You can use .referenceLine2D.contour.edges.type to determine whether it is an arc or line.
Multiple edges can exist on polygonal-shape walls.
Dominic wrote:
Here's my quick & dirty solution for wall radius:

if haskey(LABEL_ASSOC_ELEM_GEOMETRY.referenceLine2D.contour.edges[1].ArcAngle) then
Péter Baksa
Software Engineer, Library as a Platform
GRAPHISOFT SE, Budapest

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!