Validates curve to be added to the view-specific shape being constructed. Called by AddCurve() to validate input.
This function may be used to pre-validate the geometry being added to avoid AddCurve() throwing an InvalidArgumentException
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2016
Syntax
C# |
---|
public static bool ValidateCurve( Curve GCurve, DirectShapeTargetViewType targetViewType ) |
Visual Basic |
---|
Public Shared Function ValidateCurve ( _ GCurve As Curve, _ targetViewType As DirectShapeTargetViewType _ ) As Boolean |
Visual C++ |
---|
public: static bool ValidateCurve( Curve^ GCurve, DirectShapeTargetViewType targetViewType ) |
Parameters
- GCurve
- Type: Autodesk.Revit.DB..::..Curve
Curve object to be validated.
- targetViewType
- Type: Autodesk.Revit.DB..::..DirectShapeTargetViewType
View type for which this curve is intended.
Return Value
True is %GCurve% is acceptable as a part of view-specific shape representation.
Remarks
Validation conditions depend on the type of view for which the shape representation is intended.
For plan views, a curve is expected to be planar and non-degenerate (e.g., NOT a circle of zero radius).
Exceptions
Exception | Condition |
---|---|
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 |