pcb_create_track
Draw a single PCB track segment between two canvas points on a chosen layer and net, with optional width. Use it to route copper connections in EasyEDA Pro.
Instructions
Create a single track segment (line) between two points on a specified layer and net. 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | Yes | Net name for the track | |
| endX | Yes | End X coordinate | |
| endY | Yes | End Y coordinate | |
| 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. | |
| startX | Yes | Start X coordinate | |
| startY | Yes | Start Y coordinate | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| lineWidth | No | Track width (default uses design rules) | |
| 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. |