Skip to content

Commit

Permalink
IndependentTagDescriptor multi-version support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed May 7, 2024
1 parent bbe2d2a commit dfd27e5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public sealed class IndependentTagDescriptor(IndependentTag tag) : ElementDescri
nameof(IndependentTag.GetLeaderElbow) => ResolveLeaderElbow(),
nameof(IndependentTag.GetLeaderEnd) => ResolveLeaderEnd(),
nameof(IndependentTag.HasLeaderElbow) => ResolveHasLeaderElbow(),
#endif
#if REVIT2023_OR_GREATER
nameof(IndependentTag.IsLeaderVisible) => ResolveIsLeaderVisible(),
#endif
_ => null
Expand All @@ -68,7 +70,9 @@ ResolveSet ResolveLeaderElbow()

foreach (var reference in references)
{
#if REVIT2023_OR_GREATER
if (!tag.IsLeaderVisible(reference)) continue;
#endif
if (!tag.HasLeaderElbow(reference)) continue;

resolveSummary.AppendVariant(tag.GetLeaderElbow(reference));
Expand All @@ -89,7 +93,9 @@ ResolveSet ResolveLeaderEnd()

foreach (var reference in references)
{
#if REVIT2023_OR_GREATER
if (!tag.IsLeaderVisible(reference)) continue;
#endif

resolveSummary.AppendVariant(tag.GetLeaderEnd(reference));
}
Expand All @@ -103,13 +109,17 @@ ResolveSet ResolveHasLeaderElbow()
var resolveSummary = new ResolveSet(references.Count);
foreach (var reference in references)
{
#if REVIT2023_OR_GREATER
if (!tag.IsLeaderVisible(reference)) continue;
#endif

resolveSummary.AppendVariant(tag.HasLeaderElbow(reference));
}

return resolveSummary;
}
#endif
#if REVIT2023_OR_GREATER

ResolveSet ResolveIsLeaderVisible()
{
Expand Down

0 comments on commit dfd27e5

Please sign in to comment.