Repository navigation
ppt connector add
goworm edited this page Jul 8, 2026
·
56 revisions
Add connector lines between shapes or as standalone lines on a slide.
Path: /slide[N] (parent)
| Property | Default | Description |
|---|---|---|
x / left, y / top
|
2000000, 3000000
|
Start position (EMU; ~5.6cm, ~8.3cm) |
width, height
|
4000000, 0
|
Extent in EMU (~11.1cm, 0) |
name |
Connector {N} |
Connector name |
preset |
straight |
straight, elbow, curve
|
line / color / line.color
|
000000 |
Line color |
lineWidth / line.width
|
1pt |
Line width |
lineDash / linedash
|
solid |
Line dash style |
lineJoin / linejoin / line.join
|
- | Line join style at corners: round, bevel, miter (accepts compound miter:<lim>) |
miterLimit / miterlimit / miter.limit / line.miterlimit
|
- | Miter join limit in 1000ths of a percent (e.g. 800000 = 800%); implies lineJoin=miter
|
fill |
hex RGB | Connector fill color |
headEnd / headend
|
- | Arrow head: none, triangle, stealth, diamond, oval, arrow
|
tailEnd / tailend
|
- | Arrow tail: none, triangle, stealth, diamond, oval, arrow
|
rotation |
0 |
Rotation (degrees) |
startShape / from
|
- | Connected start shape. Accepts: a numeric shape index (1, 2, …), a full path (/slide[N]/shape[M]), or a full @name/@id path (/slide[N]/shape[@name=Foo], /slide[N]/shape[@id=M]). A bare @name=Foo (with no /slide[N]/shape[...] wrapper) is rejected — the selector must be the full path form. Resolves any top-level frame (shape, picture, table, chart, group, connector), not just shape. |
endShape / to
|
- | Connected end shape — same accepted forms as startShape/from. |
fromSide / startSide
|
- | (v1.0.131+) Force which edge of the from shape the line leaves: top, bottom, left, right, center. Omitted = auto-pick the edge facing the to shape. See Connector — "Edge-to-edge anchoring". |
toSide / endSide
|
- | (v1.0.131+) Force which edge of the to shape the line enters. Same values as fromSide. |
fromIdx / startIdx
|
int | (v1.0.131+) Low-level connection-site index on the from shape (0-based). Prefer fromSide. |
toIdx / endIdx
|
int | (v1.0.131+) Low-level connection-site index on the to shape (0-based). Prefer toSide. |
solid, dot, dash, dashdot, longdash, longdashdot, sysdot, sysdash
| Preset | Description |
|---|---|
straight |
Direct straight line |
elbow |
Right-angle connector |
curve |
Curved connector |
# Standalone horizontal line
officecli add slides.pptx /slide[1] --type connector --prop x=5cm --prop y=5cm --prop width=10cm --prop height=0 --prop line=FF0000 --prop lineWidth=2pt
# Elbow connector between shapes
officecli add slides.pptx /slide[1] --type connector --prop preset=elbow --prop startShape=1 --prop endShape=2
# Force a specific edge pair (v1.0.131+) — otherwise the facing edge is auto-picked
officecli add slides.pptx /slide[1] --type connector --prop 'from=/slide[1]/shape[@name=BoxA]' --prop 'to=/slide[1]/shape[@name=BoxB]' --prop fromSide=bottom --prop toSide=top
# Connector by shape name (full path form required — bare @name=Box1 is rejected)
officecli add slides.pptx /slide[1] --type connector --prop 'from=/slide[1]/shape[@name=Box1]' --prop 'to=/slide[1]/shape[@name=Box2]'
# Curved connector
officecli add slides.pptx /slide[1] --type connector --prop preset=curve --prop startShape=1 --prop endShape=3 --prop line=336699 --prop lineWidth=1.5pt
# Connector with dash style and color
officecli add slides.pptx /slide[1] --type connector --prop x=2cm --prop y=5cm --prop width=10cm --prop height=0 --prop lineColor=4472C4 --prop lineDash=dash --prop rotation=45
# Arrow connector (head and tail)
officecli add slides.pptx /slide[1] --type connector --prop x=3cm --prop y=3cm --prop width=8cm --prop height=0 --prop tailEnd=triangle
# Double arrow
officecli add slides.pptx /slide[1] --type connector --prop x=3cm --prop y=5cm --prop width=8cm --prop height=0 --prop headEnd=triangle --prop tailEnd=triangleBased on OfficeCLI v1.0.131