"Future proof" All Elements of Type?

SelectCategory_2021-11-19_02-24-19
Is there a way similar to the method shown here to select all elements of category, to select all elements of type. I don’t want to rely on the “Element Types” drop down list.All Elements of Type

Hi @EricStewartJDA,

Write in a codeblock : DSCore.Types.FindTypeByNameInAssembly("FabricSheetType", "RevitAPI"); to replace the “Element Types” drop down.

2 Likes

supply to what Alban say :wink:

4 Likes

In newer versions I believe all the drop down selections are keyed, so you shouldn’t have issues with things moving around anymore.

2 Likes

Thanks!

Maybe we can have the ID? of the Element. type :grinning:
Element.Selector.ById (Id, true) would do the rest.

This is correct. If the graph is originally authored in Revit 2020 with all updates you should have static performance in all versions.

I’ve got a node in my package, Crumple, called ElementTypeByName which does what it says, moreorless.

It finds the index from retrieving all possible element types in the API.

2 Likes

Hi @EricStewartJDA try code Block from

like @Alban_de_Chasteigner
or the custom node ElementType.ByName from clockwork
Cheers