Element collector types no category method

Good morning.
I was presented with the following query.
It happens that to compile a collection of a specific category we apply the “OfCategory” method and follow this to the real name of the category. Now my question is:
What would be the code and methods to obtain the type elements? Or is it the same process?? Or do the elements and other families have different categories?
Any recommendations please… thank you very much.


CONSULTA ELEMENT TYPES.dyn (10.3 KB)
:face_with_raised_eyebrow:

I believe you want this: OfClass Method

The modification of the Element Types dropdown was to make these in alignment. :slight_smile:

Hey @AM3D.BIM.STUDIO

I assume u looking to get the ElementType as in your collector u collected the instances of floor and if u are looking the same instances of RoomTag as well then u can proceed with this collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RoomTags).WhereElementIsNotElementType().ToElements()

And as i assumed u looking for the Type so u can just keep it same just by removing “Not” as here WhereElementIsElementType() and you are good to go for fetching the types of Roomtags.

If you are looking for something else do revert back
Regards,
BM

here is a list of all subclasses of Element class that you can access through this method.

Element Types has been renamed to Element Classes in latest Dynamo.