Convert All Selected Linked Elements to Parts

@Einar_Raknes @Tchunoo_Kahng The error I was getting was due to parts already existing in the model. It looks like this works if no parts exist. I’d be curious to know if this could be modified to do a couple things:

1.) Delete any orphaned parts.
2.) Create parts for any NEW elements. Existing parts would stay.

I can definitely see that becoming an issue if the linked file is updated while working with parts, considering how volatile modified parts are to any changes to the original element . I might have to do some digging, but steamnodes and other packages have nodes related to parts operations that might have some clues as to how to handle coordination of parts from links. finding new elements will be easy if there is a set of fixed elements, ie structural walls only, and compare the new list with list of elements from existing parts. im not sure about deleted elements, as parts that were modified heavily from elements that react to others can simply vanish completely. Very interesting issue! ill try some stuff out and post soon.

@Tchunoo_Rhee_Kahng based on what I’m seeing in the PartUtils Members, it doesn’t look like it’s possible to find orphaned parts. I could be wrong, as I’m just recently started getting myself familiar with the API and learning how to use the help file.

I think this can be done if you filter out the elements that are already parts with something similar to this:

	if PartUtils.AreElementsValidForCreateParts(doc, wallList):
		createParts = PartUtils.CreateParts(doc, wallList)
		doc.Regenerate()

The code is from this post:

This free addin has Part visualization tools that hide/isolate Parts by the original category / family / type. These tools are automatically added to the Revit context ribbon menu just by selecting Parts in the model. Start watching this video @ 3:10 Creating Parts with PartsLab

Even if you continue to use Dynamo to create your Parts, this tool is a must to quickly work with a LOT of parts, without having to create a bunch of filtered views.

@Daron_Denton @Greg.McDowell.Jr This works great on a typical project. I am however having issues on a project with all models loaded to A360 (Collaboration for Revit). When launch the app, it will ‘think’ for hours. I finally have to give up. The models aren’t too large. I think the issue might be communication with the cloud?

Hello David,

Thank you for your comment. Out of courtesy, I don’t want to hijack this thread with PartsLab conversation. Could we pick this up at suggestions @ partslab dot com?