SetFamilyName Method


Sets the family name for the DirectShapeType.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2022

Syntax

C#
public void SetFamilyName(
	string name
)
Visual Basic
Public Sub SetFamilyName ( _
	name As String _
)
Visual C++
public:
void SetFamilyName(
	String^ name
)

Parameters

name
Type: SystemString
Family name for the DirectShapeType.

Remarks

By default the family name is either Direct Shape or a category-specific name. When a category-specific name is used the family name cannot be set.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The element type name was empty, contained invalid characters, or was invalid for the specific element type.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The given DirectShapeType has a category which does not support a custom family name.

See Also