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?

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

Start recording a native macro, and stop it when I say — save it to C:\macros\hole_pattern.swp

Support differs by CAD system:

CAD systemNative recordingFormat
SOLIDWORKSYesVBA macro (.swp, .swb)
Siemens NXYesJournal (.cs, .vb)
Solid EdgeYesMacro (.bas)
Autodesk InventorNo — Inventor has no equivalent recorder exposed to CoPilotUse iLogic rules (.iLogicVb) instead
AutoCADNo — native recording and external scripts are not available through CoPilot hereRun AutoCAD's own SCRIPT or a LISP routine as a command instead, or use a CoPilot macro

Running an existing script

Run the VBA macro at C:\macros\export_step.swp on the active part
Write an iLogic rule that drives the plate thickness from the "Thickness" parameter, then run it
NX journals run in a separate, headless NX session. A journal launched this way cannot see the parts open in your live NX session. Write journals that open (or create) the file themselves, modify it, and save it — then reopen the file in your session to see the result. This is a property of how NX runs journals, not a CoPilot limitation.

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).

Import C:\macros\rename_features.swp into the Automation Hub

Browsing and running

What automations are available for SOLIDWORKS?
Show me the parameters of the "Rename features" automation
Run the "Rename features" automation with prefix set to BR- on the active part

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

Run the "Export STEP" automation once for every .sldprt in C:\parts, writing the output to C:\step

Improving an automation

CoPilot can read the code of a stored automation and either critique it or change it.

Analyse the "Rename features" automation and suggest improvements
Edit the "Export STEP" automation to add error handling and log each file it processes
An AI edit to a working script is a draft. Read the diff, and run it on a copy of a real file before it touches production data.

Scheduled tasks

Any chat request, automation or script can be put on a schedule — one-time, daily, weekly or monthly.

Every weekday at 6 am, export the BOM of C:\projects\frame.sldasm to C:\reports\frame_bom.xlsx
Tomorrow at 18:30, run a DFM report on the active part and save it to C:\reports
List my scheduled tasks
Show me the run history of the nightly BOM export
Cancel the nightly BOM export
Scheduled work runs on the workstation, through the CAD system. The machine must be on, and the CAD application reachable, at the scheduled time.

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.

What CAD commands are available for sheet metal?
Search the commands for anything to do with "pattern"
Open the Fillet command dialog
Read the open dialog and tell me what fields it has and their current values
Set the radius field to 5 and click OK
Cancel the open dialog
Opening a command only opens the UI — it does not create geometry. Reach for this when there is no direct operation for what you need; for ordinary modelling, the direct operations in Part Modeling are faster and more reliable. If a dialog is waiting for input, the chat cannot continue until it is answered, so either let CoPilot confirm it or click it yourself.

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.

Take a full-screen screenshot including the ribbon and any open dialogs

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.

Read C:\input\sizes.xlsx and tell me what columns it has
Create one plate part per row of C:\input\sizes.xlsx, named from the Part Number column, and save them in C:\parts
Write the mass and bounding box of every part in C:\parts to a new sheet in C:\reports\summary.xlsx
Build a workbook from our quotation template with the BOM of this assembly filled in

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).

Read C:\input\sizes.csv and create one plate part per row, named from the Part Number column
These tools run with your Windows account's permissions. Treat a request that writes or deletes files the way you would treat running the same command yourself — read what it proposes before you agree to it.

See also