I want to know is Orchid package able to do following:
Collect all families inside document, delete all lines inside families and of course update all the families?
Collect all families inside document, rename all family parameters inside families (without knowing all the names of parameters), and of course update all the families?
I am not very familiear with everything Orchid contains, but I do know that you can certain open families, delete lines and then save as I have written a graph to purge unused elements from detail families and load them back in. This can be a great time saver, but can also be disastrous if not done right.
I looked at your sample collection but couldn’t find the answer…That is one of the reasons I posted that on this forum
I saw in your examples that you have Element-Category.dyn where I can select all the lines inside the family and eventually delete them, but I don’t know how to load back into current project because selection nodes don’t have output “document”.
Tnx for this. Now it seems logical, but unfortunatelly I have another problem with this script…When I try to delete lines from family I get following error:
@brane1012 I don’t think the element.Delete will work like this. You have to modify the node / python to be deleting things from the Family Doc. This node as is defaults to the main Doc and won’t work.
You can see this example I have shared on here before:
With a little bit of searching, it appears that the Genius Loci Package has a Delete Element from Document Node. I would start with that package if Python isn’t the best route for you.
I am now thinking about my second question, but I believe this is not possible without actually knowing the name of parameters that I want to rename:
2. Collect all families inside document, rename all family parameters inside families (without knowing all the names of parameters), and of course update all the families?
In what way do you want them renamed? If you need specific ones renamed to some else specific you will need to have all that info. If you just want them named like “param 1” to “param 12” or something yes you can do that. I would need to get in front of a computer, but I believe bi have code to do that.
I did some testing and it seems that node works, but only when you have one family type loaded into project. When I have several types loaded into project node deletes only the first type. Is that normal?
Problem.png - is what I am actually trying to achieve. Delete all the lines from several families and family types. In the test file I used two families with two family types per each family.
Capture.png is the graph after I run it.
Although element.delete node returns both null value, first value functions OK. It deletes the all the lines inside the family. The problem is that the graph doesn’t do that on the second one.
It looks like you may be able to do this (mostly) with a few nodes:
It appears that @erfajo does have a node for renaming parameters here:
You should be able to use this python to “get” all of the parameter names in the family document for the Orchid node:
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = UnwrapElement(IN[0])
elementlist = list()
if doc.IsFamilyDocument:
for param in doc.FamilyManager.Parameters:
elementlist.append(param.Definition.Name)
OUT = elementlist