P&ID: Draw Line
pid_line_drawConnect two P&ID ports with a single LWPOLYLINE on the correct class layer, auto-routing orthogonal paths or accepting waypoints to draw process and signal lines.
Instructions
Connect two ports with one LWPOLYLINE on the class's layer.
Ports come from pid_symbol_insert; a bubble's radial port is entered
without a name. auto picks the shortest orthogonal route that leaves each
port straight for stub mm; when none exists the call refuses and says so
— pass waypoints. crossings counts existing P&ID lines the new one cuts
(reported, never refused) and port_reuse names ports that already had a
line (branching is legal). Signal classes get ISA-5.1 markers (//, X,
L, o) as small blocks on segments >= 15 mm; electric is dashed by layer.
A signal line carries no pipe line number: it gets no auto-built number
and no label, and does not consume the process sequence — a verbatim
line_number is still written and labelled. With waypoints, a bubble's
exit leaves towards the first waypoint (and the entry arrives from the
last one); crossings follows existing arcs, not their chords.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | {handle, port} of a placed symbol, or {x, y} | |
| size | No | Nominal size, e.g. 100 | |
| spec | No | Piping spec, e.g. CS1 | |
| stub | No | Minimum straight run leaving each port (mm) | |
| arrow | No | Flow arrow at the end; default per class (process yes, signal no) | |
| from_ | Yes | {handle, port} of a placed symbol, or {x, y} | |
| label | No | Write the line number along the longest segment | |
| route | No | auto (orthogonal) | direct | [[x, y], ...] waypoints | auto |
| service | No | Service code, e.g. P | |
| insulation | No | Insulation code, e.g. IH | |
| line_class | No | process_major | process_minor | utility | pneumatic | electric | hydraulic | capillary | data | process_major |
| line_number | No | Verbatim line number; omit to build one from the fields | |
| number_format | No | Default {size}-{service}-{seq}-{spec}-{insulation}; empty fields drop out |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||