-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add information about Revit APIs added in 2023 version
- Loading branch information
Showing
16 changed files
with
384 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...l/MembersTemplates/Accessors/StructuralSectionUtils_GetStructuralElementDefinitionData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Collections.Generic; | ||
using Autodesk.Revit.DB; | ||
using Autodesk.Revit.DB.Structure.StructuralSections; | ||
using RevitDBExplorer.Domain.DataModel.Accessors; | ||
using RevitDBExplorer.Domain.DataModel.Members.Accessors; | ||
using RevitDBExplorer.Domain.DataModel.ValueContainers.Base; | ||
|
||
// (c) Revit Database Explorer https://github.com/NeVeSpl/RevitDBExplorer/blob/main/license.md | ||
|
||
namespace RevitDBExplorer.Domain.DataModel.MembersTemplates.Accessors | ||
{ | ||
internal class StructuralSectionUtils_GetStructuralElementDefinitionData : MemberAccessorTypedWithDefaultPresenter<Element> | ||
{ | ||
protected override ReadResult Read(SnoopableContext context, Element typedObject) | ||
{ | ||
var status = StructuralSectionUtils.GetStructuralElementDefinitionData(context.Document, typedObject.Id, out var structuralElementDefinitionData); | ||
|
||
if (status == StructuralSectionErrorCode.Success ) | ||
{ | ||
return new ReadResult() | ||
{ | ||
CanBeSnooped = structuralElementDefinitionData != null, | ||
Label = Labeler.GetLabelForObject(structuralElementDefinitionData, context), | ||
AccessorName = nameof(StructuralSectionUtils_GetStructuralElementDefinitionData), | ||
}; | ||
} | ||
return new ReadResult() | ||
{ | ||
CanBeSnooped = false, | ||
Label = status.ToString(), | ||
AccessorName = nameof(StructuralSectionUtils_GetStructuralElementDefinitionData), | ||
}; | ||
} | ||
|
||
|
||
protected override IEnumerable<SnoopableObject> Snoop(SnoopableContext context, Element typedObject, IValueContainer state) | ||
{ | ||
var status = StructuralSectionUtils.GetStructuralElementDefinitionData(context.Document, typedObject.Id, out var structuralElementDefinitionData); | ||
yield return new SnoopableObject(context.Document, structuralElementDefinitionData); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.