ValidateCurve Method (Curve, DirectShapeTargetViewType)


View Shape Builder Validate Curve(Curve, Direct Shape Target View Type) Method

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.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool ValidateCurve(
	Curve GCurve,
	DirectShapeTargetViewType targetViewType
)

Parameters

GCurve Curve
Curve object to be validated.
targetViewType DirectShapeTargetViewType
View type for which this curve is intended.

Return Value

Boolean
True is %GCurve% is acceptable as a part of view-specific shape representation.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
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).
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 →