Defines a portion of an Analytical Model for an Element.
Inheritance Hierarchy
System.ObjectAutodesk.Revit.DB.Structure.AnalyticalModelSelector
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public class AnalyticalModelSelector : IDisposable
The AnalyticalModelSelector type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | AnalyticalModelSelector() | Creates a selector for the analytical model geometry. |
![]() | AnalyticalModelSelector(AnalyticalCurveSelector) | Creates a selector for the analytical model geometry. |
![]() | AnalyticalModelSelector(Curve) | Creates a selector based on a specific analytical curve. |
![]() | AnalyticalModelSelector(Curve, AnalyticalCurveSelector) | Creates a selector based on one portion of a specific analytical curve. |
Properties
Name | Description | |
---|---|---|
![]() | CurveSelector | The portion of the curve to be selected. |
![]() | IsValidObject | Specifies whether the .NET object represents a valid Revit entity. |
Methods
Name | Description | |
---|---|---|
![]() | Dispose | Releases all resources used by the AnalyticalModelSelector |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |
Remarks
This is used to identify the portion of an analytical model of interest to a client. To identify the portion of the analytical model, the client must identify the curve in question, by using one of the following:- The specific curve within the analytical model.
- The index of the curve within the analytical model.
- The start of the curve.
- The end of the curve.
- The entire curve. This is the default behavior, so this does not need specifying.
Example
C#
public bool GetReferenceData(AnalyticalElement analyticalModelFrame) { Curve analyticalCurve = analyticalModelFrame.GetCurve(); if (null != analyticalCurve) { // test the stable reference to the curve. AnalyticalModelSelector amSelector = new AnalyticalModelSelector(analyticalCurve); amSelector.CurveSelector = AnalyticalCurveSelector.WholeCurve; Reference curveReference = analyticalModelFrame.GetReference(amSelector); // test the stable reference to the start point of the curve amSelector.CurveSelector = AnalyticalCurveSelector.StartPoint; Reference startPointReference = analyticalModelFrame.GetReference(amSelector); // test the stable reference to the start point of the curve amSelector.CurveSelector = AnalyticalCurveSelector.EndPoint; Reference endPointReference = analyticalModelFrame.GetReference(amSelector); } return true; }
VB
Public Function GetReferenceData(analyticalModelFrame As AnalyticalMember) As Boolean Dim analyticalCurve As Curve = analyticalModelFrame.GetCurve() If analyticalCurve IsNot Nothing Then ' test the stable reference to the curve. Dim amSelector As New AnalyticalModelSelector(analyticalCurve) amSelector.CurveSelector = AnalyticalCurveSelector.WholeCurve Dim curveReference As Reference = analyticalModelFrame.GetReference(amSelector) ' test the stable reference to the start point of the curve amSelector.CurveSelector = AnalyticalCurveSelector.StartPoint Dim startPointReference As Reference = analyticalModelFrame.GetReference(amSelector) ' test the stable reference to the start point of the curve amSelector.CurveSelector = AnalyticalCurveSelector.EndPoint Dim endPointReference As Reference = analyticalModelFrame.GetReference(amSelector) End If Return True End Function