Ask Claude
File › Ask Claude… asks Claude, Anthropic's AI model, to write a drawing for you: describe what you want, a packaging style and its features ("a regular slotted case with two hand holes in the ends", "a reverse tuck end carton with an optional window") or a part from another trade (a gasket, a sheet metal bracket, a duct transition), and Claude writes it as a parametric drawing, checks it, and opens it as a new drawing. Its sizes and options are labelled variables: change them in the Variables panel (tick Run View), and the drawing follows.
How it works
Claude is given the PiQ Lang primer, the index of expressions and commands, and the drawings in your Run Parametric library (yours and the app's), which it reads as examples of the house style: inside sizes, the board's thickness allowed for, labelled variables, cuts on layer 0 and folds on layer 1, the blank's size printed. It looks up any help page it needs. As it works, it checks each draft: the drawing is run on its own, as it would open, and Claude is told
- every line that can't be read or run, and why;
- the variables it asks for, and what happens to the drawing when each is changed (each should reshape it);
- points fixed in space rather than built from variables;
- for a dieline, its pieces of board, panels, folds, holes and any cut or fold line that stops short;
and it is shown a picture of the drawing. It fixes what is wrong, and submits the drawing when it is right. A drawing that doesn't run is sent back to it. What it does is listed as it goes: the examples it reads, each check and how it went.
A drawing it writes reads no other files: IMPORT isn't allowed in it.
You can run the same check on any drawing of your own with Production › Check Dieline….
Changing a drawing
The conversation goes on: ask for a change ("make the flaps 10 mm deeper", "add a thumb notch to the tuck") and Claude changes the drawing it made, which opens again as a new drawing. The conversation goes with the drawing: choose Ask Claude again with it open, and you carry on where you left off. Claude may ask you a question instead of guessing: answer it in the same box.
With a drawing of your own open, tick Change (its name) to send it to Claude to be changed. The drawing is sent as the text of its file, with its units but none of the rest of its header (who saved it, or where).
Settings
- Model: Claude Opus 5.5, or Claude Fable 5.1 (more capable, and dearer). Changing it starts a new conversation, going on from the last drawing made.
- API key: Claude is reached through the Anthropic API, with a key of your own from the Anthropic Console
(console.anthropic.com); requests are charged to it. The key you enter is kept for you (on Windows, encrypted for
your user account). Without one kept, the key in the
ANTHROPIC_API_KEYenvironment variable is used. - Where requests go: to the Anthropic API, or, if the
ANTHROPIC_BASE_URLenvironment variable is set, to that address (a service of your own that passes requests on, say).
The tokens used so far are shown under the request. The instructions and the conversation so far are cached between requests, so most of what is read again each time is read from the cache, at a fraction of the price.
Your own rules
To have Claude follow conventions of your own (your layer names, flap widths, how you name variables), write them in
a file called Ask Claude.md in your Extensions folder (File › Extensions › Open Extensions Folder). They are added
to Claude's instructions, and come before its own conventions where they differ. Drawings you add to the Parametric
folder there are offered to Claude as examples too.
Notes
- Check a drawing before you cut it: Claude checks that it runs, is parametric and, for a dieline, holds together, but not that every allowance suits your board and your machines.
- Each drawing opens as a new, unsaved drawing; save it to keep it. Its Interactive window says which model made it, and what Claude said about it.
- For developers: the test set in PiQ.Shared.Geometry2D.Tests (
--ask-claude) sends a set of requests to Claude and checks the drawings it makes, to compare models and changes to the instructions.
See also: Run Parametric, Variables, PiQ Lang Primer.