Skip to content

Commit

Permalink
Merge pull request #240 from SergeyNefyodov/dev-family-size-table-update
Browse files Browse the repository at this point in the history
Add Family Size Table support to Family Document
  • Loading branch information
Nice3point authored May 18, 2024
2 parents a962dc9 + 9716585 commit bc886d3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace RevitLookup.Core.ComponentModel.Descriptors;

public sealed class DocumentDescriptor : Descriptor, IDescriptorResolver
public sealed class DocumentDescriptor : Descriptor, IDescriptorResolver, IDescriptorExtension
{
private readonly Document _document;

Expand Down Expand Up @@ -71,4 +71,14 @@ IVariants ResolveGetAllUnusedElements()
}
#endif
}

public void RegisterExtensions(IExtensionManager manager)
{
if (!_document.IsFamilyDocument) return;
manager.Register(nameof(FamilySizeTableManager.GetFamilySizeTableManager), context =>
{
var result = FamilySizeTableManager.GetFamilySizeTableManager(context, new ElementId(BuiltInParameter.RBS_LOOKUP_TABLE_NAME));
return Variants.Single(result);
});
}
}

0 comments on commit bc886d3

Please sign in to comment.