Python problem...Setting Grid Leader Elbows

See attached image.

I am trying to reset all of the grid leaders (move the grid bubbles back in line with the grid) using Dynamo/PythonScript.

I am able to get all of the XYZs for the Leader Anchor/End/Elbow with no trouble. My script is calculating the point to move the elbow back to correctly (called “setvalZ” in the image and seen in the watch node index 6). The line “gridleader.Elbow = setvalZ” should be moving the Leader Elbows back in line with the grids, but they are not moving at all.

Help…

Move leader Elbows

Solution…Just follow it with Grid.SetLeader()…

1 Like

Just found an awesome article that can be helpful to others who search for this.
Thanks for identifying SetLeader Ben. Here’s the C# code example:

http://adndevblog.typepad.com/aec/mep/
Revit Sample file with C# Macro for reading and setting grid leaders.
https://github.com/jaimerosales/revit-macros/tree/master/SyncGridLeaders-2016

I am not good in c# , can you send it in a python code . if it is possible through dynamo please tell