IsSupportedDocument Method


Tests whether a DirectShape or a DirectShapeType may be created in this document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2017

Syntax

C#
public static bool IsSupportedDocument(
	Document document
)
Visual Basic
Public Shared Function IsSupportedDocument ( _
	document As Document _
) As Boolean
Visual C++
public:
static bool IsSupportedDocument(
	Document^ document
)

Parameters

document
Type: Autodesk.Revit.DB Document
Document to be tested.

Return Value

True if a DirectShape or a DirectShapeType object can be created in this document, false otherwise.

Remarks

Some types of Document, such as 2D families, can't support DirectShape functionality.

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 →