Commands  ›  Drainage  ›  Match Height

Match Height

Drainage writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document must be open. At least two pipes must exist in the model. User must select two valid pipe elements.

After it runs

Source pipe endpoint matches target pipe endpoint elevation. Source pipe is moved vertically by the elevation difference.

When to use this

Don't use this when

Not for autonomous AI execution. This command requires interactive Revit UI input (dialogs, picks, or manual confirmation).

Side effects

Moves the source pipe element vertically.

Inputs

NameKindTypeRequiredDefaultDescription
SourcePipe selection Pipe yes Pipe to move (will be modified)
"Select SOURCE pipe (this pipe will be moved)"
TargetPipe selection Pipe yes Pipe to match elevation to (stays in place)
"Select TARGET pipe (source will match this elevation)"

Returns

NameTypeDescription
ElevationDeltadoubleThe elevation change applied

Decision flow

check: document.isOpen → continue
action: promptUserToSelectSourcePipe → getSourcePipe
action: promptUserToSelectTargetPipe → getTargetPipe
check: bothPipesValid → continue, else → error
action: calculateElevationDifference → delta
action: moveSourcePipe → updateModel
resolve: success → showSuccess, else → showError

What you'll see in the chat

on start
Matching pipe endpoint elevations...
Preparing to align pipe heights...
thinking
Identifying source pipe endpoint...
Identifying target pipe endpoint...
Calculating elevation difference...
Moving source pipe to target elevation...
on success
Pipe height matched — moved {ElevationDelta} to align.
on failure
Height matching failed: {error}

REST API

Not yet exposed

This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:

  • POST /api/v1/commands/match_height
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

match height · align elevation · pipe level · match z · same height · align pipes
Patterns: match * height · align * elevation · same * height

Related commandsExtendPipeUpCommand · ExtendPipeDownCommand
PillarDrainage