Hi, could you please post your result?
I don´t get it to work. I want to replace families if the same name already exists. Currently it copies the object and adds a new family with the same name ending with a consecutive number.
options = CopyPasteOptions()
options.SetDuplicateTypeNamesHandler()
# I struggle with this area
#options.SetDuplicateTypeNamesHandler(new DuplicateTypeAction.UseDestinationTypes)
#DuplicateTypeAction.UseDestinationTypes
#new IDuplicateTypeNamesHandler
TransactionManager.Instance.EnsureInTransaction(doc)
copy = ElementTransformUtils.CopyElements(linkDoc, eId, doc, tf1, options)
TransactionManager.Instance.TransactionTaskDone()
Hi @jw.vanasselt, thanks for your response! I tried your script, it doesn’t work.
I wonder if it is a dynamo issue. I tried my original script in revit python shell, it’s working out fine. Very strange!