Selecting/Filtering elements by subcategory in project environment

Alban,

I have another question,

I would like to compare Project subcategories with family subcategories and delete from the project the one that should not exist.

I have created this graph but I dont know how to retrieve the id of the subcategories so I can delete them.

Any ideas?

I am using the python script from this post but I don’t think is correct.

Dyn attached.

Home.dyn (13.9 KB)