Create Method (Document, String, ElementId, DirectShapeTypeOptions)


Direct Shape Type Create(Document, String, Element Id, Direct Shape Type Options) Method

Creates a DirectShapeType element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static DirectShapeType Create(
	Document document,
	string name,
	ElementId categoryId,
	DirectShapeTypeOptions options
)

Parameters

document Document
Document to which the created element will be added.
name String
Name of the DirectShapeType.
categoryId ElementId
Id of the category assigned to this DirectShapeType. Must be a valid category id.
options DirectShapeTypeOptions
Options that can be used to control the behavior of DirectShapeType being created.

Return Value

DirectShapeType
The new DirectShapeType.
Exceptions
Exception Condition
ArgumentException Document document may not contain DirectShape or DirectShapeType objects. -or- Element id categoryId may not be used as a DirectShape category.
ArgumentNullException A non-optional argument was null
See Also