I am needing to Get all the leader end points of Tags to Pipes. The pipes being tagged are in a linked model. So Dynamo sees the pipe Tags as Independent tags. The OOTB Nodes for getting the Leader End point do not recognize Independent Tags. I have found Nodes from the Packages MEPover and GeniusLoci that will Get the Host Tag Position. I am hoping it is as easy as updating the code, but I am not familiar with how to find the command for Leader end Instead of TagHostPosition.
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
if isinstance(IN[0], list):
tags = UnwrapElement(IN[0])
else:
tags = [UnwrapElement(IN[0])]
listout = []
for x in tags:
loc = x.TagHeadPosition.ToPoint()
listout.append(loc)
OUT = listout
Long Story Short, I am trying to move all the Attached pipe tags that are to the center of the pipe, make them free end and move the leader to edge of pipe. I can get this to work when the pipes are not in a linked model and I am tagging from the same model, but when the pipes are in a linked model it will not work because the nodes get errors with Independent Tags instead of them being PipeTags.
Thanks, sorry for the long post.
Thank you @Draxl_Andreas for the rewrite. I might have not described my problem incorrectly. I am looking to get the Leader End point instead of the TagHeadPosition. Do you think you could update that? I am not sure what to update TagHeadPosition with.
Thank You! I will give this a try and let you know. I seem to have problems when it comes to Python stuff. Is it as simple as copy and paste into the Python Node?