Export: the drawing as a file
POST /export/{format} runs the template with the values given and returns the drawing as a file, in the
format named in the path:
| Format | File |
|---|---|
pdf |
PDF: layers as optional content, dieline layers as spot colours. |
svg |
SVG. |
eps |
Encapsulated PostScript. |
ai |
Adobe Illustrator. |
png, jpeg, webp |
A picture. |
gcode |
G-code, for a cutting or routing machine. |
hpgl |
HP-GL, for a plotter or cutting table. |
cf2, ddes |
CF2 or DDES3, for die-makers (and automatic rule benders: see Rule benders). |
lightburn |
A LightBurn project (.lbrn2): each layer a LightBurn layer, cut, scored or engraved by what it is. See LightBurn. |
lasersvg |
SVG for Glowforge and xTool: size in millimetres, cuts red, scores blue, engraving filled black. See SVG for Glowforge and xTool. |
dstv |
DSTV NC (.nc1) for steel fabrication machines: each piece cut out on the Cut layer, its holes, part mark and marking lines; several pieces come as a ZIP file of .nc1 files. See DSTV NC and Formats. |
ifc |
An IFC4 steel model (.ifc): each plate an IfcPlate, each piece of a profile an IfcBeam with its section, round holes and copes as openings, mark, grade, quantity and weights attached. See IFC steel model. |
benddxf |
A sheet-metal flat blank as DXF R12 with its bend data for press brakes: outline, holes and bend lines on Inventor's layer names, each bend's way, angle, radius and order as XDATA and as a note. See DXF with bend data. |
step |
The drawing folded up (each bend to its note's angle) as a STEP AP214 faceted solid in millimetres. See STEP folded part. |
glb |
The drawing made 3D (folded, extruded … as ParametrIQ's 3D view makes it) as a binary glTF model: life-size in metres, Y up, standing folded, in its look's materials with the artwork, and the "Fold" animation. For web viewers and augmented reality (WebXR, Android's Scene Viewer, <model-viewer>). See glTF and Augmented reality. |
usdz |
The drawing made 3D as a USDZ model for AR Quick Look on iPhones and iPads: life-size, standing on the ground, folding up as it opens. See AR proofs (USDZ). |
matcutterdxf, matcutterhpgl |
A mount for a computerised mat cutter, as DXF R12 (layers STRAIGHT, BEVEL, VGROOVE, PEN) or as HP-GL (a pen for each kind of cut), in cutting order. See Mat cutter DXF and Mat cutter HP-GL. |
dielinepdf |
The print-ready dieline PDF for printers and packaging designers: the cut on a spot colour (Dieline or CutContour), creases on Crease, overprinting; bleed and safe-area guides; trim and bleed boxes. See Dieline PDF. |
specsheetpdf |
A spec sheet for the customer to approve: one A4 landscape page with the dieline and its overall sizes, a picture of it folded, its sizes, board, blank, folded size and pallet pattern (specPallet), the board's weight and the box's strength when specGrammage and specEdgeCrush are given, a revision table and an approval box (specCustomer, specReference). See Spec sheet. |
printcutpdf, printcuteps |
Print-and-cut PDF or EPS for a RIP: artwork in process colours, the cut layers as hairlines in the CutContour spot colour (overprinting), registration marks printed in black. See Print-and-cut PDF and EPS. |
gpgl |
GP-GL for a Graphtec cutting plotter: the cut layers, a pass each, in 0.1 mm steps. See GP-GL. |
cuttingsvg |
SVG for Cricut Design Space and Silhouette Studio: true size in millimetres, a group and colour per layer. See SVG for Cricut and Silhouette. |
aamadxf |
An AAMA/ASTM D6673 pattern file (DXF R12) for apparel CAD and cutting rooms: each pattern piece (a closed outline on the Cut layer) a block with its boundary, notches, grain line, internal and sew lines, drill holes, name and quantity, in the drawing's units, one size. See AAMA/ASTM DXF. |
tiledpdf |
A tiled print: the drawing full size on sheets of paper (A4, or Letter for an inch drawing, unless tilePaper says) with overlaps, alignment crosses and page labels, and a cover page with a test square, to print at 100%. See Tiled print. |
projectorpdf |
A projector PDF: the drawing full size on one page, thick light lines on black, each layer as optional content, with a test square. See Projector PDF. |
wraptemplatepdf |
Wrap-around templates: the pipework templates found in the drawing (two ends and three quarter lines, a quarter of the girth apart) full size on sheets of paper as the tiled print (tilePaper, tileOrientation, tileOverlap), each marked with its angles round the pipe, quadrant ticks, centre lines, an overlap strip and its girth. See Wrap-around templates. |
dxf |
DXF (AutoCAD 2013), for other CAD programs. |
piq |
The drawing itself, still parametric. |
Formats lists them with their media types and file name extensions.
The body is a template (as template, or as source from one of your storages) and values for its labelled variables, as described on the API page. How the file is made can be set in options:
| Option | |
|---|---|
margin |
Space round the drawing on the page, in points (1/72 inch), 0 to 1000. 18 unless given. |
spotColours |
PDF, EPS and AI: dieline layers (cut, crease …) as spot colours named after them. True unless given. |
textAsOutlines |
Text drawn as shapes rather than as text. |
width |
Pictures: pixels across (the height in proportion), up to 8000; 0 for the drawing's own size at dpi. |
dpi |
Pictures: pixels to the inch, 1 to 1200, when width is 0. 150 unless given. |
quality |
JPEG and WebP quality, 1 to 100. 90 unless given. |
transparent |
PNG and WebP: a transparent background rather than white. |
title |
The title written into the file, where the format has one. |
dielineCutSpot |
Dieline PDF: the spot colour the cut lines are on: Dieline unless given; CutContour for print-and-cut RIPs, or the name a printer asks for. |
dielineCreaseSpot |
Dieline PDF: the spot colour the creases are on. Crease unless given. |
dielineBleed |
Dieline PDF: a bleed guide this far outside each blank's cut outline, in the drawing's units; the bleed box is the trim this much bigger. 0 (none) unless given. |
dielineSafe |
Dieline PDF: a safe-area guide this far inside each panel, in the drawing's units. 0 (none) unless given. |
embedDesign |
Dieline PDF and PDF-compatible AI: the drawing carried inside the file (an attachment and XMP metadata), so the artwork that comes back opens again in ParametrIQ CAD as the design. True unless given. |
designName |
The file name the carried design is given (box.piq). design.piq unless given. |
tilePaper |
Tiled print: the paper size, A4, A3, Letter, Legal or Tabloid. A4 unless given, or Letter for a drawing in inches. |
tileOrientation |
Tiled print: which way up the pages are, Portrait, Landscape or Automatic (whichever takes fewer pages; portrait if the same). Automatic unless given. |
appearance |
glb and usdz: the look, an appearance's id from GET /appearances ("corrugated-bc-kraft", "stainless-brushed" …). The appearance for the drawing's material unless given. |
animate |
glb and usdz: with the fold animation (flat to folded); false for the model standing folded only. True unless given. |
tileOverlap |
Tiled print: how much of the drawing each page repeats of the next (to the right and below), to tape over, in the drawing's units. 10 mm unless given (0.4 in for a drawing in inches); at most 100 mm, and no more than half a page's printed area. |
The options are for PDF, SVG, EPS, AI and pictures, and those named for a format (the dieline PDF's, the tiled print's) for it; the other formats are written as they are. A picture that would
be more than 8000 pixels across or up is refused (400): give a width, or a lower dpi.
Example
POST /export/pdf
X-API-KEY: your-api-key
Content-Type: application/json
{
"template": "L=400,\"Length\"\nW=300,\"Width\"\nP1=[L,0]\nP2=[L,W]\nP3=[0,W]\nPOLYLINE @1,[P0,P1,P2,P3],TRUE,0",
"values": { "L": 500, "W": 250 },
"options": { "margin": 18, "spotColours": true }
}
The answer is the file itself, with its media type (application/pdf here) and a file name
(drawing.pdf). The X-PiQ-Warnings header says how many things couldn't be exported as they are (an element the
format has no way to write, say): 0 when everything was.
An unknown format is answered 400. To keep the file in your own storage rather than download it, use
Save.