From 89d8fc0c0e5774a2860bb907bda81ad64c7f1e5f Mon Sep 17 00:00:00 2001 From: NeVeSpl Date: Thu, 10 Oct 2024 19:38:15 +0200 Subject: [PATCH] add support for revit api : StructuralSettings.GetStructuralSettings, SunAndShadowSettings.GetActiveSunAndShadowSettings, RevisionNumberingSequence.GetAllRevisionNumberingSequences, AreaVolumeSettings.GetAreaVolumeSettings, SolidSolidCutUtils.IsElementFromAppropriateContext, FamilyUtils.FamilyCanConvertToFaceHostBased, PlumbingUtils.HasOpenConnector --- .../MembersTemplates/Document_Templates.cs | 6 ++++++ .../MembersTemplates/Element_Templates.cs | 1 + .../MembersTemplates/Family_Templates.cs | 3 +++ .../MembersTemplates/Pipe_Templates.cs | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Pipe_Templates.cs diff --git a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Document_Templates.cs b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Document_Templates.cs index b599baf..642310c 100644 --- a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Document_Templates.cs +++ b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Document_Templates.cs @@ -29,6 +29,12 @@ public IEnumerable GetTemplates() => #if R2023_MIN MemberTemplate.Create((doc, target) => AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(doc)), #endif + MemberTemplate.Create((doc, target) => StructuralSettings.GetStructuralSettings(doc)), + MemberTemplate.Create((doc, target) => SunAndShadowSettings.GetActiveSunAndShadowSettings(target)), +#if R2022_MIN + MemberTemplate.Create((doc, target) => RevisionNumberingSequence.GetAllRevisionNumberingSequences(target)), +#endif + MemberTemplate.Create((doc, target) => AreaVolumeSettings.GetAreaVolumeSettings(target)), ]; } } \ No newline at end of file diff --git a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Element_Templates.cs b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Element_Templates.cs index 9c7782d..405afe6 100644 --- a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Element_Templates.cs +++ b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Element_Templates.cs @@ -29,6 +29,7 @@ public IEnumerable GetTemplates() => MemberTemplate.Create((document, target) => SolidSolidCutUtils.IsAllowedForSolidCut(target)), MemberTemplate.Create((document, target) => SolidSolidCutUtils.GetCuttingSolids(target)), MemberTemplate.Create((document, target) => SolidSolidCutUtils.GetSolidsBeingCut(target)), + MemberTemplate.Create((document, target) => SolidSolidCutUtils.IsElementFromAppropriateContext(target)), MemberTemplate.Create((document, target) => ElementTransformUtils.CanMirrorElement(document, target.Id)), ]; diff --git a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Family_Templates.cs b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Family_Templates.cs index 278fb99..58a4733 100644 --- a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Family_Templates.cs +++ b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Family_Templates.cs @@ -13,6 +13,9 @@ public IEnumerable GetTemplates() => [ MemberTemplate.Create((doc, target) => doc.EditFamily(target), kind: MemberKind.AsArgument), MemberTemplate.Create((doc, target) => FamilySizeTableManager.GetFamilySizeTableManager(doc, target.Id), kind: MemberKind.StaticMethod), + + MemberTemplate.Create((doc, target) => FamilyUtils.FamilyCanConvertToFaceHostBased(doc, target.Id), kind: MemberKind.StaticMethod), + ]; } } \ No newline at end of file diff --git a/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Pipe_Templates.cs b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Pipe_Templates.cs new file mode 100644 index 0000000..22b8426 --- /dev/null +++ b/sources/RevitDBExplorer/Domain/DataModel/MembersTemplates/Pipe_Templates.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using Autodesk.Revit.DB.Plumbing; +using RevitDBExplorer.Domain.DataModel.Members; +using RevitDBExplorer.Domain.DataModel.Members.Base; + +// (c) Revit Database Explorer https://github.com/NeVeSpl/RevitDBExplorer/blob/main/license.md + +namespace RevitDBExplorer.Domain.DataModel.MembersTemplates +{ + internal class Pipe_Templates : IHaveMemberTemplates + { + public IEnumerable GetTemplates() => + [ + MemberTemplate.Create((doc, target) => PlumbingUtils.HasOpenConnector(doc, target.Id), kind: MemberKind.StaticMethod), + + ]; + } +}