pcb_create_pad
Create a standalone pad on a PCB with configurable shape, hole, layer, and position in mil coordinates for SMD or through-hole designs.
Instructions
Create a standalone pad on the PCB. pad (the shape) is required; sizes and hole dimensions are in mil. Coordinates are PCB canvas coordinates in mil (1 mil = 0.001 inch), relative to the canvas origin: +X = rightward, +Y = upward. Lengths (widths, diameters) are also in mil. Use pcb_canvas_origin to read/set the origin offset and pcb_convert_coordinates to convert between canvas and data coordinates.
Shapes: ['ELLIPSE'|'OVAL'|'NGON', width, height], ['RECT', width, height, cornerRadius], or ['POLYGON', source] where source is [{x, y}, ...] or a raw L-mode source array. Holes: ['ROUND', diameter] or ['SLOT', width, height]; null or omitted for an SMD pad.
Examples:
SMD pad: layer 1, padNumber "1", pad ['ELLIPSE', 60, 60], hole null.
Through-hole pad: layer 12 (Multi), padNumber "1", pad ['ELLIPSE', 80, 80], hole ['ROUND', 35], metallization true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| net | No | Net name | |
| pad | Yes | Pad shape: ['ELLIPSE'|'OVAL'|'NGON', width, height], ['RECT', width, height, cornerRadius] or ['POLYGON', source]. Mil. | |
| hole | No | Drill hole: ['ROUND', diameter] or ['SLOT', width, height] in mil; null or omitted for an SMD pad | |
| layer | Yes | Layer name (e.g. "TopLayer", "BottomLayer", "Inner1".."Inner30", "Multi") or numeric EPCB_LayerId (1=Top, 2=Bottom, 12=Multi). Names are converted to the numeric id EasyEDA requires. | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| rotation | No | Rotation angle in degrees | |
| padNumber | Yes | Pad number/name | |
| holeOffsetX | No | Hole X offset from the pad centre (mil) | |
| holeOffsetY | No | Hole Y offset from the pad centre (mil) | |
| instance_id | No | Target EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances. | |
| holeRotation | No | Hole rotation in degrees | |
| metallization | No | Whether the hole is plated (true for a normal through-hole pad) |