I made a Dynamo-script for exporting Schedules to Excel.
There for I also used the Standard Node ‘Element Types’.
The Dynamo-script and this node (Element Types) works fine for Revit 2018, but when I use the same dynamo-script for Revit 2019, things go wrong…
(Revit 2018)
It looks like Revit 2019 has more ‘Element types’, because the ‘element types’ Node displays not te same element type in comparising with Revit 2018. For Example: Instead of ‘ViewSchedule’ it displays ‘ViewFamilyType’.
Unfortunately a ‘String’ or ‘Code Block’ as a String doesn’t work.
Is there also a Node ‘by name’ for Element type? Because I can’t find something like that.
I found a solution, but it is a little bit weird to add al those Nodes only for Revit 2019:
I have also used Clockwork and either Get Item at Index (Document.ElementTypes has a sort node) or the string search to define the Element Type I needed.
A more robust version of this would be useful OOTB. Like the Category by Name as f.land mentioned.
Or at least as a Code Block? Anyone (@jacob.small or similarly knowledgeable) know how we might define that?
Element type by name doesn’t scale vary well, because there are too many element type options and there is a near certainty of an overlapping name. Pulling the ‘first’ or “every matching” type by name is going to cause a lot of misses. Note that the ‘family type by name’ node in Rhythm goes with the first method, which works fine unless you want the window that is 30x84 and the door which was 30x84 was added to the job first.
For this reason, I’d narrow your search a bit, which Dynamo has already accommodated (in the case above anyway).
A datashapes powered UI which allows selection of the type after an initial selection of the category/family/whatever is another option as well (Note that family.byname can’t overlap ).