I’m trying to open multiple .rfa documents (300+) to do some modifications, which include deleting parameters and associating parameters to generic forms (extrusions, sweeps, etc.). The parameters are deleted, but the material parameter for the generic forms are not associating with the document parameter. I think being used is not working because the script is obtaining all generic forms from the project that is open and active, not the family document that is open in the background. How to I select all solid generic forms of a .rfa in a background document?
If you want a list, you’d have to amend to something like…
docList = UnwrapElement(IN[0])
outList = []
for doc in docList:
outList.append(FilteredElementCollector(doc).OfClass(GenericForm)
OUT = outList
There may be typos in this
If you notice, I’m not using orchid nodes for this specific task, I’m using Rhythm, because it returns a Document object I can use… I think that given your graph, that will still work if you mix them, but I might be wrong.
Hi Mark. I have a similar situation to @ mcowleyC3ZDV. I have tried your python node with the modifications you suggested, but I keep getting errors I can’t really understand, here’s the code as modified per your direction:
Now, once this problem is fixed, what I obtain is a list of Autodesk.Revit.DB.Element, in this case Autodesk.Revit.DB.Extrusion, but I can’t seem to access the extrusions themselves, I can’t find a way to unwrap those:
You are accessing the Extrusions, but as a Revit element… Therefore you can use the Python to pull any of the information available from Revit… Extrusion Properties
Though, I’m not sure it is available for every type of element… One workaround is to output the element ID from Python, then use select by ID in Dynamo…
Hi Mark. I have been working on this during the weekend. I already consulted the site you suggested
and I was able to unwrap the elements as you indicated, with a simple additional python node:
so that does give me the extrusions I am after, directly from background family documents, however, when it comes to associating shared parameters to those, it is proving difficult, I am trying to use the code in this thread, but it’s written for a different workflow (working in the current document as opposed to background ones)
anyway, I think I am violating the forum rules, I probably should follow up with a new topic, I appreciate your help!