FamilyType.Duplicate not working in 2017 / 2018

Hello All,

I’m having some issues with the FamilyType.Duplicate node from the clockwork package (I’ve also tried the springs equivalent) in Revit 2017 / 2018. I’ve tried using both 1.3.4 & 2.0.2 Dynamo and even some legacy versions of clockwork - but I get the same issues:

Here is the node working correctly in Revit 2019 (with DYN 2.0.2):

FamilyTypeDuplicate1

… and here is the issue I’m seeing in 2017 / 2018:

FamilyTypeDuplicate2

Does anyone have any suggestions on what might be causing this?

Cheers,

Martin

Beat way to debug this yourself is to open the Clockwork node up to see the contents, and move the functions into the Dynamo graph via copy/paste.

Hi @PowellDesign

Here is another possible way to write in python which i tested in Revit 2017/18/19, Dynamo ver 1.3x and 2.0x :

import clr
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
# Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

# Import RevitAPI
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
result = []
famtype = UnwrapElement(IN[0])
dupnames = IN[1]

for s in dupnames:
    TransactionManager.Instance.EnsureInTransaction(doc)
    newsymbol = famtype.Duplicate(s)
    result.Add(newsymbol.ToDSType(True))
TransactionManager.Instance.TransactionTaskDone()
OUT = result
1 Like