IsValidShape Method (IList(GeometryObject), DirectShapeTargetViewType)


Validates view-specific shape to be stored in a DirectShapeType. Expects a non-default view type. Shape of this object expressed as a collection of Geometry objects

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Since: 2017

Syntax

C#
public bool IsValidShape(
	IList<GeometryObject> shape,
	DirectShapeTargetViewType viewType
)
Visual Basic
Public Function IsValidShape ( _
	shape As IList(Of GeometryObject), _
	viewType As DirectShapeTargetViewType _
) As Boolean
Visual C++
public:
bool IsValidShape(
	IList<GeometryObject^>^ shape, 
	DirectShapeTargetViewType viewType
)

Parameters

shape
Type: System.Collections.Generic IList GeometryObject
viewType
Type: Autodesk.Revit.DB DirectShapeTargetViewType
The view type this shape is intended for.

Return Value

True if the supplied shape passes the validation criteria.

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

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 →