Commands  ›  Drainage  ›  Extend Pipe To Next Level

Extend Pipe To Next Level

Drainage writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document must be open. At least one pipe must exist in the model. At least two primary levels must exist (current and target). User must select a valid pipe element.

After it runs

A new pipe is created extending from the selected pipe to the next primary level. Extension terminates at level elevation + 150mm offset. New pipe matches system, size and family routing types. Bend fitting created at connection point (optional).

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

Creates a new pipe element in the model. May create a bend fitting element.

Inputs

NameKindTypeRequiredDefaultDescription
Pipe selection Pipe yes Pipe to extend to next level
"Select a pipe to extend to the next level"
LevelOffset config double no 150.0 Offset above level elevation in mm
CreateBend config bool no true Whether to create bend fitting at connection

Returns

NameTypeDescription
ExtensionPipePipeThe created extension pipe
TargetLevelstringName of level extended to
ExtensionLengthdoubleLength of extension in mm

Decision flow

check: document.isOpen → continue
action: promptUserToSelectPipe → getSelectedPipe
check: selectedElement.isPipe → continue, else → error
action: getPrimaryLevels → ListLevels.GetPrimaryLevels
check: primaryLevels.count >= 2 → continue, else → error (need at least current + target)
action: findCurrentLevel → LevelResolver.GetNearestLevel
action: findNextLevelAbove → compare elevations
check: nextLevel.exists → continue, else → error (already at top)
action: calculateExtensionLength → targetLevel.elevation + offset - currentZ
action: createExtensionPipe → ExtendPipeToNextLevel.Extend
resolve: success → showSuccess, else → showError

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/extend_pipe_to_next_level
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

extend pipe level · pipe to next level · extend to floor · drainage riser · stack extension · SVP extend · extend pipe to level
Patterns: extend * pipe * level · extend * to * floor · grow * pipe * level · pipe * next * level

Related commandsExtendPipeUpCommand · ExtendPipeDownCommand · PlaceSVPCommand
PillarDrainage