In an attempt to neatly align spotelevations, I’m trying to access the leader location lines.
- select elements
- get location through nodes: gives the insertion point of a spot elevation not the leader / shoulder.
- through python / api I believe this would be the Leader class, which would give access to the elbow.
- my thought is: after getting the location of the elbows, set that location to a common x-value: done.
Accessing it through python gives ‘no attribute Leader’. Which makes sense however … how would I be able to access it?
import clr clr.AddReference('RevitServices') import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument elements = UnwrapElement(IN) output =  TransactionManager.Instance.EnsureInTransaction(doc) for element in elements: new = element.Leader result = new output.append(result) TransactionManager.Instance.TransactionTaskDone() #Assign your output to the OUT variable. OUT = output