ValidateShape Method


View Shape Builder Validate Shape Method

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, curves or polylines. 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: 27.0.4.0 (27.0.4.0)
Syntax
public static bool ValidateShape(
	IList<GeometryObject> shape,
	DirectShapeTargetViewType targetViewType
)

Parameters

shape IList GeometryObject
targetViewType DirectShapeTargetViewType

Return Value

Boolean
Returns true if %shape% may be used as a view-specific shape representation, false otherwise.
Exceptions
Exception Condition
ArgumentException targetViewType is not DirectShapeTargetViewType::Plan
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
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 →