ValidateCurve Method


Validates curve to be added to the view-specific shape being constructed. Called by addCurve. Expects a valid view normal to be set prior to the call. This function may be used to pre-validate the geometry being added to avoid addCurve throwing an InvalidArgumentException

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2015

Syntax

C#
public bool ValidateCurve(
	Curve GCurve
)
Visual Basic
Public Function ValidateCurve ( _
	GCurve As Curve _
) As Boolean
Visual C++
public:
bool ValidateCurve(
	Curve^ GCurve
)

Parameters

GCurve
Type: Autodesk.Revit.DB Curve

Return Value

True is %GCurve% is acceptable as a part of view-specific shape representation being built. 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

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →