diff --git a/source/RevitLookup/Core/ComponentModel/Descriptors/DocumentDescriptor.cs b/source/RevitLookup/Core/ComponentModel/Descriptors/DocumentDescriptor.cs index 23e9d8ab..fb024b00 100644 --- a/source/RevitLookup/Core/ComponentModel/Descriptors/DocumentDescriptor.cs +++ b/source/RevitLookup/Core/ComponentModel/Descriptors/DocumentDescriptor.cs @@ -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; @@ -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); + }); + } } \ No newline at end of file