| DirectShapeTypeCreate(Document, String, ElementId) Method | 
   Creates a DirectShapeType element.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
 Syntax
Syntaxpublic static DirectShapeType Create(
	Document document,
	string name,
	ElementId categoryId
)
Public Shared Function Create ( 
	document As Document,
	name As String,
	categoryId As ElementId
) As DirectShapeType
public:
static DirectShapeType^ Create(
	Document^ document, 
	String^ name, 
	ElementId^ categoryId
)
static member Create : 
        document : Document * 
        name : string * 
        categoryId : ElementId -> DirectShapeType Parameters
- 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
DirectShapeType
   The new DirectShapeType.
 Exceptions
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 | 
 See Also
See Also