Is Revit 2020 and Dynamo 2.3.1 did have node “ElementType.ByName” as Revit 2022.
is there any alternative way to “ElementType.ByName” in Revit 2020?
Is Revit 2020 and Dynamo 2.3.1 did have node “ElementType.ByName” as Revit 2022.
is there any alternative way to “ElementType.ByName” in Revit 2020?
Try my custom package Crumple. There is a node that can do exactly this under Crumple > Revit > Element types
Nope!
Not working As in ElementType.ByName in Revit 2022.
@erfajo Orchid working but not as in Revit 2022.
Oh that’s different yes - mine works with literal element types in Dynamo (like the element type dropdown options, not family types). Probably not possible in 2020 or prior without some Python and some targetted categories/family type names.
Hm…So I think need to crate a script to do this.
use a code block and eliminate the need for a custom package:
and the code to paste in a code block:
DSCore.Types.FindTypeByNameInAssembly("WallType", "RevitAPI");
note: replace “WallType” with whatever your element type you selected in the dropdown is.
Revit.Elements.FamilyType.ByName("A1 metric");
@john_pierson Astonish to me. Tanks a lot.
What’s the error say?
Warning: FamilyType.ByName operation failed.
A FamilySymbol with the specified name, MVS-AR-SlabEdge_ 24" x 12", does not exist in the document.
But it does.
the Revit 2022 got that. Revit 2020 did not.
Hmm, maybe the handling within that node had changed between versions.
I think So.
It looks like that one should work with the elementtype method I mentioned.
Although I think there is a chance we are running into problems with the family name not having the same spaces, case, etc.
I tend to do this kind of thing to eliminate those kind of issues.
elementTypeCaseInsensitive.dyn (24.1 KB)
I coped the family name and past in the code block in both.
in the same template in Revit 2022 got that name. but Revit 2020 did not.
Aw yeah. I just pushed a monocle update yesterday that fixed that. It happens when you are in manual run mode and the drop down has not been ran. (Also I did attach my graph above)
@erfajo thanks for the reply. I will check that.