Hi, i need to use the node Element.Type from the Clockwork package in my python script.
But there is a other node from Rhythem with the same name.
How can I be sure to use the node from Clockwork?
I don’t think you can call the clockwork one with your Python script regardless of the clash with Rhythm. This is because clockwork is not a core node.
The quickest way I think to handle this is to credit Andreas as much as you can and reuse his code.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
items = UnwrapElement(IN[0])
#This portion would not be possible without the great contributions by Andreas Dieckmann and his Clockwork Package. All code in this section is from him.
typelist = list()
for item in items:
try:
typelist.append(item.Document.GetElement(item.GetTypeId()))
except:
typelist.append(list())
#Concludes the portion of code that was used from Clockwork
OUT = typelist
John, in my experience renaming is not an issue as long as you don’t do it in Dynamo (using Save As) as that will change the node GUID. Renaming outside of Dynamo means a) renaming the *.dyf file in Windows Explorer and b) changing the node name with a text editor. I’ve never ad any problems with this method like e.g. nested nodes not being found etc.