IsValidShape Method (IList(GeometryObject), DirectShapeTargetViewType)


Validates view-specific shape to be stored in a DirectShape. Expects a non-default view type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
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
Shape of this object expressed as a collection of GeometryObjects. For viewType = DirectShapeTargetViewType::Default, the supported types of GeometryObjects are: Solid, Mesh, GeometryInstance, Point and Curve. For viewType = DirectShapeTargetViewType::Plan, the supported types of GeometryObjects are: Point and Curve.
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