Create and delete family types for revit familys in a folder


#1

So i have to create several types for several different familys
i’ll better explain it in the attached picture.
I would be glad if anybody could help me on this one


#2

Managed to do this. But it is returning me empty lists…
I would still need to delete the existing types


#3

That node dont take files as input, it takes family types as input.


#4

Is there a node that does the same thing but works with files as input?


#5

I dont think so… but it should be doable to code it in python…

an idea could be to use DanEDU.Loadfamily, then use those families in combination with the springs node… then use DanEDU.Savefamily… in a dummy project


#6

Unfortunetely i don’t know anything about python… so i guess i’ll have to load the families into a project. Create the types from there and then use that method you thought me before to export those familys


#7

I think that would be doable… and maybe the most flexible in the long run :slight_smile:


#8

So i did that… and it still didn’t work… Any ideas?


#9


Managed to do that. But how do i delete a family type?
Since all the familys are a copy from one family. they all have one type in common. I need to mass delete it.
Thanks for your help!


#10

I am afraid you need coding… if I find the time, I will try to look into it. I cant promise anything…


#11

It just came to my mind… what about “Element.Delete”

I have this graph for “cleaning” line patterns in projects, it must be doable to resuse parts from that :slight_smile:

an Idea, rename all families after loading to include “dummy”, then make the copy with the spring node and the “real” names. Then search all types including “dummy” in their name, delete them… end by saving the remaining families.


#12

I realized i was doing a mistake… Could you help me ?


#13

Tryed to do that through Dicionary function but it didn’t work


#14

Relaunched Dynamo and that worked. Now i’ll try what you suggested @erfajo


#15

Found the solution.
Here it is


#16

Glad that all of my suggestions worked so you could mark yourself as the solution…


#17

I think that the idea for the solution marking is that we do it in one way that future user’s come to the topic and quickly find the solution for the issue.
Being so, i marked my self as the solution, because it had the most straightforward way of troubleshooting what the topic intends to do.
It doesn’t mean i have any credits about it. Of course it belongs to you @erfajo