Commands  ›  Drainage  ›  Match Pipe Centers

Match Pipe Centers

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.

After it runs

Target pipe centerline aligns with reference pipe extension. Pipes are now in position to be connected with an elbow.

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 target pipe element horizontally.

Inputs

NameKindTypeRequiredDefaultDescription
ReferencePipe selection Pipe yes Reference pipe (stays in place)
"Select REFERENCE pipe (this pipe stays in place)"
TargetPipe selection Pipe yes Target pipe (will be moved)
"Select TARGET pipe (this pipe will be shifted)"

Returns

NameTypeDescription
XOffsetdoubleX offset applied in feet
YOffsetdoubleY offset applied in feet

Decision flow

check: document.isOpen → continue
action: promptUserToSelectReferencePipe → getReferencePipe
action: promptUserToSelectTargetPipe → getTargetPipe
check: bothPipesValid → continue, else → error
action: calculateXYOffset → offset
action: moveTargetPipe → shift
resolve: success → complete, else → showError

What you'll see in the chat

on start
Aligning pipe centerlines...
Matching pipe centers in X/Y...
thinking
Getting reference pipe geometry...
Calculating X/Y offset to align centerlines...
Shifting target pipe into position...
on success
Pipes aligned. Shifted by X={XOffset}, Y={YOffset}.
on failure
Could not align pipes: {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_pipe_centers
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

match centers · align pipes · centerline · shift pipe · align xy · match centerline
Patterns: match * center · align * centerline · shift * pipe

Related commandsMatchHeightCommand · MatchHeightAndFilletCommand
PillarDrainage