I’ve made a script to straighten slightly-off-axis walls based on one piece of wall orientation.
The script is working pretty well on those pieces of wall that don’t have any door or other elements hosted on them.
Any idea to let these elements move according with wall new rotation keeping their initial placement?
I’ve already extracted door’s start location, found the parameter along the curve and mapped them back on the final wall location (rotated).
Thanks in advance
can you share some screenshots?
Do have already a script`?
FamilyInstance.SetLocation (from Springs or GeniusLoci) and FamilyInstance.SetRotation?
As a new user I think I cannot upload files.
Let’s try to upload it on an external source.
i tested … your doors also move thats a nogo …
as far as I can notice the problem is that the new position of the wall instance has been set by Element.GetLocation > Rotate > Element.SetLocation.
Once the wall is rotated the hosted elements should move accordingly (if u try to do it manully using the UI there’s definitely no problem).
If you try instead to do it with dynamo, hosted elements move from their original position and in the best case they just move a little (few centimeters), in the worst they just come out of the host so that Revit ask you to address those issues getting rid of those elements or going back.
I don’t think FamilyInstance.SetLocation works, first of all because I am working with system families as Walls. That node should work only for component families. The correct one is Element.SetLocation.
Anyway I think the problem is inside the workflow rather than the nodes,
did u get the same reasults?
The ovverride graphic node makes red all the walls that remain unparallel at the end of the script
colouring just for one element
and your doors are moving!