RenameSubclass Method


Changes the subclass field of all property sets in this library from one value to another.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2012

Syntax

C#
public int RenameSubclass(
	string oldSubclass,
	string newSubclass
)
Visual Basic
Public Function RenameSubclass ( _
	oldSubclass As String, _
	newSubclass As String _
) As Integer
Visual C++
public:
int RenameSubclass(
	String^ oldSubclass, 
	String^ newSubclass
)

Parameters

oldSubclass
Type: System String
The existing subclass to rename.
newSubclass
Type: System String
The new subclass applied to all property sets matching the given oldSubclass .

Return Value

The number of property sets whose subclass was changed.

Remarks

A subclass can be "deleted" from the library by passing an empty string as the new subclass.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ObjectAccessException The property set library is read-only.

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 →