GetCategory Method (Document, ElementId)


Retrieves a category object corresponding to the category id.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.0)
Since: 2016

Syntax

C#
public static Category GetCategory(
	Document document,
	ElementId categoryId
)
Visual Basic
Public Shared Function GetCategory ( _
	document As Document, _
	categoryId As ElementId _
) As Category
Visual C++
public:
static Category^ GetCategory(
	Document^ document, 
	ElementId^ categoryId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
categoryId
Type: Autodesk.Revit.DB ElementId
An category id.

Return Value

Returns a category object corresponding to the category id.

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 →