PromptToMatchElementType Method


UIDocument Prompt To Match Element Type Method

Prompts the user to select elements to change them to the input type.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void PromptToMatchElementType(
	ElementType elementType
)

Parameters

elementType ElementType
The ElementType applied to selected instances.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
InvalidOperationException This document is not the currently active one. -or- Starting a new transaction is not permitted. It could be because another transaction already started and has not been completed yet, or the document is in a state in which it cannot start a new transaction.
Remarks
This method uses its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can select multiple elements to be modified to the given type, until they finish.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →