Skip to content

Commit cb87f3c

Browse files
committed
fix for older version of revit
1 parent 94a5918 commit cb87f3c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sources/RevitDBExplorer/Domain/RevitDatabaseQuery/Parser/Commands/CategoryCmdDefinition.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ public void Init(Document document)
2323

2424
foreach (Category category in categories)
2525
{
26+
#if R2023_MIN
2627
var builtInCategory = category.BuiltInCategory;
28+
#endif
29+
#if R2022_MAX
30+
var builtInCategory = (BuiltInCategory)category.Id.IntegerValue;
31+
#endif
32+
33+
if (builtInCategory == BuiltInCategory.INVALID) continue;
2734

2835
var label = LabelUtils.GetLabelFor(builtInCategory);
2936

0 commit comments

Comments
 (0)