Skip to content

Commit

Permalink
add support for revit api : StructuralSettings.GetStructuralSettings,…
Browse files Browse the repository at this point in the history
… SunAndShadowSettings.GetActiveSunAndShadowSettings, RevisionNumberingSequence.GetAllRevisionNumberingSequences, AreaVolumeSettings.GetAreaVolumeSettings, SolidSolidCutUtils.IsElementFromAppropriateContext, FamilyUtils.FamilyCanConvertToFaceHostBased, PlumbingUtils.HasOpenConnector
  • Loading branch information
NeVeSpl committed Oct 10, 2024
1 parent 63f360a commit 89d8fc0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public IEnumerable<ISnoopableMemberTemplate> GetTemplates() =>
#if R2023_MIN
MemberTemplate<Document>.Create((doc, target) => AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(doc)),
#endif
MemberTemplate<Document>.Create((doc, target) => StructuralSettings.GetStructuralSettings(doc)),
MemberTemplate<Document>.Create((doc, target) => SunAndShadowSettings.GetActiveSunAndShadowSettings(target)),
#if R2022_MIN
MemberTemplate<Document>.Create((doc, target) => RevisionNumberingSequence.GetAllRevisionNumberingSequences(target)),
#endif
MemberTemplate<Document>.Create((doc, target) => AreaVolumeSettings.GetAreaVolumeSettings(target)),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public IEnumerable<ISnoopableMemberTemplate> GetTemplates() =>
MemberTemplate<Element>.Create((document, target) => SolidSolidCutUtils.IsAllowedForSolidCut(target)),
MemberTemplate<Element>.Create((document, target) => SolidSolidCutUtils.GetCuttingSolids(target)),
MemberTemplate<Element>.Create((document, target) => SolidSolidCutUtils.GetSolidsBeingCut(target)),
MemberTemplate<Element>.Create((document, target) => SolidSolidCutUtils.IsElementFromAppropriateContext(target)),

MemberTemplate<Element>.Create((document, target) => ElementTransformUtils.CanMirrorElement(document, target.Id)),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public IEnumerable<ISnoopableMemberTemplate> GetTemplates() =>
[
MemberTemplate<Family>.Create((doc, target) => doc.EditFamily(target), kind: MemberKind.AsArgument),
MemberTemplate<Family>.Create((doc, target) => FamilySizeTableManager.GetFamilySizeTableManager(doc, target.Id), kind: MemberKind.StaticMethod),

MemberTemplate<Family>.Create((doc, target) => FamilyUtils.FamilyCanConvertToFaceHostBased(doc, target.Id), kind: MemberKind.StaticMethod),

];
}
}
Original file line number Diff line number Diff line change
@@ -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<ISnoopableMemberTemplate> GetTemplates() =>
[
MemberTemplate<Pipe>.Create((doc, target) => PlumbingUtils.HasOpenConnector(doc, target.Id), kind: MemberKind.StaticMethod),

];
}
}

0 comments on commit 89d8fc0

Please sign in to comment.