GetAssets Method


Gets all the Assets of the specified type.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.0)
Since: 2018.1

Syntax

C#
public IList<Asset> GetAssets(
	AssetType assetType
)
Visual Basic
Public Function GetAssets ( _
	assetType As AssetType _
) As IList(Of Asset)
Visual C++
public:
IList<Asset^>^ GetAssets(
	AssetType assetType
)

Parameters

assetType
Type: Autodesk.Revit.DB.Visual AssetType
The asset type.

Return Value

Returns an array of all the Assets within Revit of the specified type.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

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 →