Native Macros & Automation
Your CAD system's own macros and journals, the Automation Hub that turns them into named commands, scheduled tasks, and the odd jobs around a CAD job — spreadsheets, dialogs and scripts. For CoPilot's own recorded macros, see Macros.
Which one do I want?
- CoPilot macro — you did something with CoPilot and want to do it again. Recorded and replayed by CoPilot as a
.cadmacrotext file; no code. Start here — it is the one most people need. - Variation template — one master document in several named sizes, filled in as a grid.
- Native CAD macro or journal — a SOLIDWORKS VBA macro, an NX journal or a Solid Edge macro that already exists, or that you want recorded in the CAD system's own format. This page.
- Automation Hub — a library of those scripts with named parameters, so you (or a colleague) can run them without opening a code editor. This page.
- Scheduled task — the same work, but at 6 a.m. on Tuesdays. This page.
Native CAD macros and journals
CoPilot can drive your CAD system's own recorder, and can run scripts that already exist.
Recording in the CAD system's own format
Support differs by CAD system:
| CAD system | Native recording | Format |
|---|---|---|
| SOLIDWORKS | Yes | VBA macro (.swp, .swb) |
| Siemens NX | Yes | Journal (.cs, .vb) |
| Solid Edge | Yes | Macro (.bas) |
| Autodesk Inventor | No — Inventor has no equivalent recorder exposed to CoPilot | Use iLogic rules (.iLogicVb) instead |
| AutoCAD | No — native recording and external scripts are not available through CoPilot here | Run AutoCAD's own SCRIPT or a LISP routine as a command instead, or use a CoPilot macro |
Running an existing script
The Automation Hub
The Automation Hub is a catalogue of scripts with declared parameters. Import a script once, and afterwards anyone can run it by name with values filled in, without touching the code.
Importing
Accepted files: .cs and .vb (NX journals), .swp and .swb (SOLIDWORKS macros), .iLogicVb (Inventor), .bas (Solid Edge) and .dll (.NET assemblies).
Browsing and running
Asking for the parameters first is worth the extra prompt: it tells you the types, defaults and allowed values before anything runs.
Running one automation over many inputs
Improving an automation
CoPilot can read the code of a stored automation and either critique it or change it.
Scheduled tasks
Any chat request, automation or script can be put on a schedule — one-time, daily, weekly or monthly.
Driving a CAD command's dialog
Some jobs are only reachable through a dialog. CoPilot can find a command, open it, read what is on screen, fill the fields in and confirm — the same actions you would perform with the mouse.
A full-screen capture including all dialogs and panels is available when you want to show CoPilot — or a colleague — the exact state of the screen.
Spreadsheets and data
Much repetitive CAD work is really data work: a list of sizes in, a table of results out. CoPilot reads and writes Excel workbooks and CSV files directly.
Workbooks can also be exported to CSV or HTML, worksheets added, and cells formatted. For sending the result on to another system — ERP, email, a REST endpoint — see Connections.
Scripting, when nothing else fits
CoPilot can also run Python, PowerShell and shell commands on the workstation — useful for the file-handling around a CAD job (renaming an export batch, tidying a folder, reading a CSV of dimensions before it drives a model).
See also
- Macros — CoPilot's own recorded macros, the
.cadmacrolanguage and the library. - Variations — a family of sizes from one master.
- Skills — standing instructions rather than replayed steps.
- Chat Basics
- SOLIDWORKS · Inventor · NX · Solid Edge · AutoCAD
- Verifying results