I am creating a script to delete all families containing a certain “R” prefix. By using Clockwork’s “All Families of Category”, I can select and filter and delete easily. However, “All Families of Category” does not work on system families (their disclaimer on it was right), and the same goes for “All Family Types of Category”. So, how do I select wall types (not Elements) by a set filter and then delete them?
I have tried “Wall Type” with delete, but it requires you to pick individual wall types already contained within the project. This would require 20 separate lines for each type, and would be useless for new introduced types.
I have tried “WallType.ByName”, which uses a string, but I can’t figure out how to get it to run sucessfully for ALL names that simply contain a substring.
I have tried “All Placed Family Types of Category”, which works on walls, but only on wall types that have been placed, and these walls will only exist as legend components, which this command does not consider to be “placed”.
Does anyone know of a solution, or perhaps another package I should download that would allow me to select All Family Types of Category, as with clockwork, but one that actually works on system families? I currently have the latest Clockwork, LunchBox, and archi-lab.net, none of which have a command for this.
The issue is not with the string, the issue is with specifically selecting multiple wall types. All of those posts are simply various methods of selecting multiple elements, not types. When it comes to selecting wall types, my options are limited to only WallType.ByName and Wall Types, both of which normally only process one item at a time. Wall Types doesn’t take an input so I can’t use a list, and WallType.ByName only accepts singular wall types, not lists of wall types. I need a way to select multiple wall types.
Try Element.GetType from Wombat Dynamo or Elements.Type from Archilab or Element.Type from Clockwork or the OOTB Element.ElementType node, or even better, Element Types + All Elements of Type, then use a ElementFilter.ByNameContains or ElementFilter.ByNameBeginsWith from Beaker
Thank you for the suggestions, everyone. Unfortunately none of these options can select multiple types. I am not looking to select all elements of a type (which is what every single one of those examples will do instead), nor am I looking to select a singular type from a project (which is all that Element Types does).
I want to select all wall types. Not instances of types. Or just one Type. All types. Once I have that, I can filter from there.
Element Types requires picking only one type, it cannot receive a list. And leaving blank in the hopes that it will report all of the types simply returns a null value. Elements.GetType and Elements.Type simply tell you the type of an element that exists. I have no elements, only types. I don’t need to find the type of the element, nor is it a viable option for selecting the type. There are lots of options for selecting elements, but my options become very slim when you are trying to select multiple Types specifically.
I have been looking around on google for any possibilities of packages with a script to do what I am seeking to do, but have no luck so far.
Looks like I’m not the only one with this problem. This thread did not achieve a solution either. As he said, this solution is not ideal as it requires you to specify each wall. This does not allow for any changes to types within the project, or it will fail or miss new types.
No, this causes it to select the placed instance wall elements within the project, not the types themselves. This is proven by running it with delete elements and it will delete the wall instances, but types remain intact.
EDIT: Tried it out and deleting them actually works for me. It deleted all instances and the type. Which delete node are you using? Keep in mind you have to keep at least one Wall Type of each kind in a project, so you should be left with 3 Wall Types.
Yes, but as I stated earlier, that does not work. It requires you to select from a drop down menu, one of the types in the project. That is not what I want. I want to select multiple types with a text filter, not a manual selection.
You’re not listening. The WallTypes node has a dropdown for a single Wall Type. But the Element Types node has a dropdown with an option for WallType. Using All Elements of Type on this node will get you all the Wall Types in your project.