Orchid Package Help: Error while creating new FamilyTypes

I’ve taken the visual script from Aussie BIM Guru relating the import of Revit family data using Dynamo as a reference to create new FamilyTypes of a given family while setting new parameters.
(Link to his video: Import Revit family data using Dynamo! - YouTube)

The following image describes the error I’m getting when running the script:

First of all I’m opening the FamilyDocument and define the names of the new FamilyTypes to be created. The block FamilyType.All gives me all existing FamilyTypes in the FamilyDocument of the input family (Kabelschacht). Now I want to create new FamilyTypes using the FamilyDocument and the names. The names of the new ones are not listed in the FamilyTypes of the FamilyDocument but I still get the error:

“FamilyType.Create fehlgeschlagen.
Name already in use.”

My current solution is that I disconnect the blocks FamilyType.Create and Document.ToOrchidType and run the script. After this I reconnect the blocks and rerun the visual script. Now everything is working fine and FamilyType.Create creates the new FamilyTypes as intended.

I’ve tried to look up a proper solution for that but I haven’t found anything.
I would appreciate any help.

Thanks in advanced!

Paul

Hi Paul,

From what you describe, I suspect that you need the Dynamo graph to run in 2 transactions, instead of the typical 1.

This is kind of what you do by running the first part, then hooking up the second part?

You can force this using an ‘End Transaction’ (and a Start Transaction) node between the 2 parts…

image

Hope that helps,

Mark

Hi Mark,

I tried to solve the problem with Transaction.End and Transaction.Start. However this sadly doesn’t solve my problem. I still get the same Error that the name is already in use. I created this baseline of this visual script last year and updated it now. Therefore I’m working in Revit2022.

I’ve recently installed Revit2023 and now I tried to run this visual script in the new version. I got a notification that my visual script includes blocks that rely on a old python-engine. Therefore I’ve updated my tree and now I can feed the output of Family.FamilyDocument directly into the block FamilyType.Create. This solved my problem. I dont get the error relating existing names anymore.

Thank you for your input Mark.

Greetings!

Paul