Dynamo: Use node in a python script, if there are nodes from different packages, with same name

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?

That is my import for all custom made packages:

One way would be to delete the Rhythem node…but i don’t want to do this.
Any other idea?

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
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:
#Concludes the portion of code that was used from Clockwork

OUT = typelist
1 Like

On another note, I have been meaning to rename my Rhythm node, but it is used in a few of my other nodes. :scream:

ok thx John for your help

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.

1 Like