RVTDocs.com

DirectShapeType.Create(Document, String, ElementId)

Method
Description:
Creates a DirectShapeType element.
Syntax
public static DirectShapeType Create(
	Document document,
	string name,
	ElementId categoryId
)
Parameters
Parameter Type Description
document Document Document to which the created element will be added. Must be a project document.
name String Name of the DirectShapeType.
categoryId ElementId Id of the category assigned to this DirectShapeType. Must be a valid category id.
Return Value
Type Description
DirectShapeType The new DirectShapeType.
Exceptions
Exception Condition
ArgumentException document is not a project document. -or- 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