CategoriesNewSubcategory Method |
Add a new subcategory into the Autodesk Revit document.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntaxpublic Category NewSubcategory(
Category parentCategory,
string name
)
Public Function NewSubcategory (
parentCategory As Category,
name As String
) As Category
public:
Category^ NewSubcategory(
Category^ parentCategory,
String^ name
)
member NewSubcategory :
parentCategory : Category *
name : string -> Category
Parameters
- parentCategory Category
- The parent category.
- name String
- The new category name.
Return Value
CategoryIf successful, the newly created subcategory.
ExceptionsException | Condition |
---|
ArgumentNullException |
Thrown when the input argument-"parentCategory" or "name"-is .
|
ArgumentException |
Thrown when the input argument-"parentCategory"-cannot add subcategory.
Thrown when the input argument-"name"-is an illegal name.
|
InvalidOperationException |
Thrown when subcategory creation failed.
|
See Also