Revit 2018 API |
ViewShapeBuilder..::..ValidateShape Method |
ViewShapeBuilder Class See Also |
Validates a shape represented as a collection of geometry objects for use as a view-specific shape.
The objects are expected to be either points or curves. Curves are expected to be flat and lie in a plane
perpendicular to view normal as defined by view type.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since:
2017
Syntax
C# |
---|
public static bool ValidateShape( IList<GeometryObject> shape, DirectShapeTargetViewType targetViewType ) |
Visual Basic |
---|
Public Shared Function ValidateShape ( _ shape As IList(Of GeometryObject), _ targetViewType As DirectShapeTargetViewType _ ) As Boolean |
Visual C++ |
---|
public: static bool ValidateShape( IList<GeometryObject^>^ shape, DirectShapeTargetViewType targetViewType ) |
Parameters
- shape
- Type: System.Collections.Generic..::..IList<(Of <(<'GeometryObject>)>)>
- targetViewType
- Type: Autodesk.Revit.DB..::..DirectShapeTargetViewType
Return Value
Returns true if %shape% may be used as a view-specific shape representation, false otherwise.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | targetViewType is not DirectShapeTargetViewType::Plan |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |