Post text
Hello,
I’m working in Dynamo for Revit and I want to automatically number windows per floor, counter-clockwise around the building, starting from a user-defined start point.
What I want to achieve:
-
User picks a start point on a facade using “Select Point on Face”
-
That point defines Window 01
-
All windows on the same level are then:
-
sorted counter-clockwise
-
numbered sequentially (01, 02, 03, …)
-
-
Numbering restarts per level
-
The result is written to a shared instance parameter on Windows
Current approach:
-
Categories → Windows -
All Elements of Category -
Element.Location -
Point.Subtract(window point – picked start point) -
Python node using
atan2(Y, X)to calculate angles -
List.SortByKeyfor CCW sorting -
Sequence → Number.ToString → String.PadLeft -
Element.SetParameterByName
Questions:
-
Is this the recommended approach for CCW sorting from a picked point in Dynamo?
-
Is there a cleaner / more robust way to handle per-level grouping?
-
Any pitfalls with
Select Point on FaceI should be aware of?
Thanks in advance!