Setup & Requirements
Python Version
LinkCAD 11 ships with an embedded Python 3.11 interpreter. No separate Python installation is required.
Plugin Location
Place Python plugin files (.py) in one of these directories:
- User plugins:
%APPDATA%\LinkCAD\plugins\ - System plugins:
<LinkCAD install dir>\plugins\
LinkCAD scans these directories on startup and registers any plugins it finds.
Accessing the Console
Open the interactive Python console from the menu:
- View → Python Console (Ctrl+Shift+P)
The console provides full access to the linkcad package and the currently loaded drawing.
Script Editor
LinkCAD includes a built-in script editor:
- View → Python Script Editor (Ctrl+Shift+E)
- Run the current script with F5
- Run the selected text with Ctrl+↵
Package Structure
The linkcad Python package exposes the following modules through the stable linkcad.v1 API:
| Module | Purpose |
|---|---|
linkcad.v1.plugin | Plugin framework — decorators, options, base classes |
linkcad.v1.db | Drawing database — cells, layers, shapes, transactions |
linkcad.v1.geom | Geometry primitives — points, vectors, transforms, bounds |
linkcad.v1.edit | Geometry tasks — merge, flatten, snap, join, explode |
linkcad.v1.env | Options and logging — persistent settings, event log |
linkcad.v1.conv | File format conversion — load and save drawings |
linkcad.v1.libgraph | Boolean geometry — union, intersection, difference |
linkcad.v1.controller | High-level conversion workflow controller |
API Versioning
All imports should use linkcad.v1.* submodules. This pins your script to the stable v1 API surface so it will continue to work as the LinkCAD Python API evolves:
# Recommended — pinned to v1from linkcad.v1.db import Drawing, Cell, Layerfrom linkcad.v1.geom import Point, VectorYou can check the API version at runtime:
import linkcadprint(linkcad.API_VERSION) # "v1"Installing Additional Packages
You can install additional Python packages using pip in the LinkCAD Python environment:
import subprocesssubprocess.check_call(["pip", "install", "numpy"])