Application: ContextualAnalyticalModel
Revit Platform: Structure
Revit Version: 2023.0
First Released For: 2023.0
Programming Language: C#
Skill Level: Medium
Category: Geometry, Elements, Structure, UI
Type: ExternalCommand

Subject: Contextual Analytical Model
Summary: 
Contextual Analytical Model

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Structure.AnalyticalMember
Autodesk.Revit.DB.Structure.AnalyticalPanel
Autodesk.Revit.DB.Structure.AnalyticalOpening
Autodesk.Revit.DB.Transaction
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementId
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Document
Autodesk.Revit.UI.Events
Autodesk.Revit.UI.UIDocument

Project Files: 
CreateAnalyticalMember.cs – command which creates an AnalyticalMember element
CreateAnalyticalPanel.cs – command which creates an AnalyticalPanel element and an AnalyticalOpening
AddRelation.cs – command which adds a new relation between physical and analytical elements
UpdateRelation.cs – command which updates existing relation between physical and analytical elements using AnalyticalToPhysicalRelationManager
BreakRelation.cs – command which will break an existing relation between physical and analytical elements
Utilities.cs – utility class
ModifyPanelContour.cs – command which replaces a Line from an AnalyticalPanel with an Arc using SketchEditScopep
MoveAnalyticalMemberUsingElementTransformUtils.cs – command which moves an AnalyticalMember from two connected Analytical Members while keeping end nodes connected
MoveAnalyticalMemberUsingSetCurve.cs – command which moves an AnalyticalMember from two connected Analytical Members and breaks the end nodes connectivity
MoveAnalyticalNodeUsingElementTransformUtils.cs – command which moves an AnalyticalNode without breaking the connectivity of the converging Analytical Elements in that node
MoveAnalyticalPanelUsingElementTransformUtils.cs – command which moves an AnalyticalPanel connected with an AnalyticalMember while keeping the connectivity between the two
MoveAnalyticalPanelUsingSketchEditScope.cs – command which moves an AnalyticalPanel connected with an AnalyticaMember and breaks their connectivity
AnalyticalNodeConnStatus.cs – sample related analytical nodes connection status
FlipAnalyticalMember.cs – command which flips an analytical member curve
ReleaseConditionsAnalyticalMember.cs – commands which reads the release conditions of an Analytical Member.
MemberForcesAnalyticalMember.cs – command which reads the member forces of an Analytical Member
SetOuterContourForPanels.cs – command which creates and then edit the outer contour for a panel.

Description: 
This sample provides the following functionalities:
-	How to create different kinds of analytical elements
- 	How to add/update/break relations between analytical and physical elements
-	How to move analytical elements with keeping or without keeping the end nodes connected
-	How to flip an Analytical Member
-	How to get/set Member Forces and Release Conditions
-	How to set the outer contour of an Analytical Panel