Creating new opening (door and windows) family types with different lengths

Hi everyone,
I’m facing a weird issue with dynamo scripting. I have to create many door types in the same script. The types are defined by the length of the doors that I read from an excel file so I have to create automatically doors with different lengths and may be widths. I created the script attached to this message. I already did this for the creation of walls with different widths (with walls.duplicate node) and it worked fine.
The problem for the doors (with familytype.dupicate) is that it creates only one type and it changes its length all over the process of reading the excel file so at the end of the script execution, I obtain one family type with the last length read from excel file.

Can someone help me with this so I can create multiple types and not only one ??


Hi @a.kaci,

Can you add your excel and .dyn files ?
It’s not possible to help you with this small screenshot.

Here they are.

door_personnalized_all.dyn (30.6 KB)
id_03_E1_EPSG_3949.xlsx (8.5 KB)

Sorry, the dynamo script is this one :

door_personnalized_all.dyn (29.1 KB)

You can’t input negative values into Width parameter (largeur)

The (largeur) value is the last column in the excel file (column name : length). They are not negative.

Yes. but you’re not enterint the correct cells in the FamilyType.Duplicate node.
You 've also length of 0.05 m in your excel file. Revit doesn’t make the door type.

I fixed your graph
You need to review a little your excel file I think.

.door_personnalized_all V2.dyn (29.3 KB)

No, your script didn’t work. The bug is not here.
As you can see in the first sreenshot, all the values of the length column are read correctly. I can see in is the watch node. Then I want to create a type whose name is “the conversion of the length to string”. I want to understand why the only created type is 0,74 which corresponds to the first line in the excel file. It seems like we cannot create several types in the same script with the node (family duplicate).

Of course that my correction is working !

Set lacing on longest on FamilyType.Duplicate to create several types.

Edit : Excel.ReadFromFile node doesn’t work in my company so I don’t need the transpose node.

I will try it again :slight_smile:

I still get errors!!

test_door_personnalized_all V2.dyn (13.4 KB)

We are not using the same excel reader node and I think we don’t have the same first output.

Mine is from the package ExcelReader.

I edited your first try. Maybe it will work with Excel.ReadFromFile.
door_personnalized_all V3.dyn (14.0 KB)

Yes, this is why it wasn’t working . Now the bug is fixed.

Thanks a lot Alban!