Object Style SubCategory Selection

We have a model that for some reason has thousands of the SubCategory in Object Styles Detail Items called “+ 1 Gray Pen 1”.

I would like to select them and delete them but am having a problem getting the subcategory selection in Dynamo.

The subcategory “+1 Gray Pen” is not found. I am obviously doing something wrong. How can I structure the graph to select the desired subcategory?

Thanks.

Node “FilterByBoolMask” work in ather way. In “mask” you need connect list of boolean parameters, like: false, false, true …
Can you show code in python node (after Flatten node)?
(Sorry for my bad english :slight_smile: )

To clarify- you use FilterByBoolMask as below
The Python script must convert the names to human format

Hey Benjamin.

I am having a similar problem but have not figured out how to delete a subcategory. Have you found a solution?

I can get the names as strings of subcategories, but to get the id and delete the subcategory/all elements of it itself?

Robert

In Revit 2017 your are able to batch delete the line style sub-categories.

I see. It works but still looking to make it automatic without manual labour.

How did you get the String Names of the Object Styles?
I have tried python subcat.Name.ToString()
but thats just giving me an error.