Create Method


Creates a DirectShapeType element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2015

Syntax

C#
public static DirectShapeType Create(
	Document document,
	string name,
	ElementId categoryId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	name As String, _
	categoryId As ElementId _
) As DirectShapeType
Visual C++
public:
static DirectShapeType^ Create(
	Document^ document, 
	String^ name, 
	ElementId^ categoryId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document that will contain the new element.
name
Type: System String
Name of the DirectShapeType.
categoryId
Type: Autodesk.Revit.DB ElementId
Id of the category assigned to this DirectShapeType. Must be a valid category id.

Return Value

The new DirectShapeType.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Element id categoryId does not correspond to a top-level built-in category.
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 →