Saving, Backups and Reverting
Saving
File › Save writes the drawing to its file; File › Save as to a new one. A drawing is saved as text, one command per line, in the same language the Interactive window uses: first what the drawing's pages share (its layers, variables, functions and part library), then each page, after a PAGE line, with its own points and its elements.
File › Recent Drawings lists the drawings opened lately, to open one again; one that is no longer there is said so and taken off the list. Clear List, at the bottom of the list, forgets them all (and their pictures) at once; it doesn't ask first, and it can't be undone (the drawings themselves are not touched).
File › Recent Designs lists the parametric designs run lately, to run one again: see Run Parametric. Its Clear List forgets them all in the same way.
File › Send by Email › Drawing… emails the drawing as it is now, changes not saved included, as a .piq file,
without saving it: see Emailing exports.
What the file says about itself
A saved drawing starts with a few lines saying what wrote it, which version of the file format it is in, and its units:
//Product// ParametrIQ CAD
//Version// 3.2
//Format// 1
//Units// MILLIMETERS
Nothing else goes in the file but the drawing: not who saved it, on which computer or when, and not how it was last looked at. So saving a drawing that hasn't changed writes exactly the same file, and a drawing kept in version control, or compared with an older copy, shows only what really changed. (Who saved it, where and when are still given to save extensions and written to the drawing index.)
Where you were looking (the middle of the view, and how near) is kept by the app instead, by the file's path, with the recent drawings: open the drawing again and it is shown as you left it. A drawing opened for the first time on this computer is shown whole.
The format version
//Format// says which version of the drawing file format the file is in. It goes up when a drawing saved by a newer
ParametrIQ could be read wrongly by an older one. Opening a file in a newer format than this version knows warns you
first: it may not read correctly. Check it before relying on it, and use Save as rather than saving over the file,
so that what this version doesn't know isn't lost. A file without the line (written by hand, say) is read as the
current format.
Backups
Each time a drawing is saved over its file, the file as it was is kept first as a backup beside it, numbered:
carton.piq the drawing
carton;1.piq as it was before the first save over it
carton;2.piq before the second
The newest ten are kept (or as many as you choose in Preferences); older ones are removed. The name works on Windows, macOS and Linux alike, sorts each backup next to its drawing, and keeps the extension, so a backup opens as a drawing.
File › Backups lists the newest backups, with the drawing each is of and when it was made. Choose one to open it: it opens as a copy, so that Save asks where to keep it. Save it over the drawing to restore it, or somewhere else to keep both. A backup that has been moved or deleted is no longer listed. The start page lists the newest five under Recent backups, each with its picture: Open opens it the same way, and Discard deletes the backup's file (after asking).
Recovery copies
Every two minutes (or as often as you choose in Preferences), each open drawing with changes that aren't saved yet is copied to a recovery copy: in the app's own folder, never over your file, and for drawings that have never been saved too. Making the copy doesn't interrupt your work, and doesn't touch the undo history. A drawing's copy is removed when you save it, or close it (whether you keep its changes or not).
If ParametrIQ stops without closing properly (it crashes, or the computer does), the copies are still there the next time it starts. It opens on the start page with Recover unsaved work at the top, highlighted: each drawing whose copy has work its file hasn't (it was never saved, its file is gone, or the copy is newer than the file), with its picture, when it was copied and its size. Open opens it as it was at its last copy, with its changes not saved yet; Discard removes its copy (after asking). Copies you leave there are listed again next time.
When none of the copies has anything its file hasn't, ParametrIQ asks about them instead, listing each drawing and when it was copied:
- Restore opens each as it was at its last copy, with its changes not saved yet: titled as before, and, if it had been saved before, saved to the same file when you save it. Its undo history isn't recovered.
- Discard removes the copies.
- Decide Later keeps them, to be offered again next time.
The copies are kept in PiQ/Recovery in your user application data folder (on Windows, %APPDATA%\PiQ\Recovery).
Setting the interval to 0 in Preferences turns recovery copies off.
Files a drawing reads
IMPORT and MERGE read other files. A relative path in them
("parts/tab.piq", with / or \\ between folders) is read from the drawing's own folder, so a folder of drawings
can be moved, copied or shared as a whole; a full path ("C:\\Parts\\tab.piq") is read as it is.
When ParametrIQ writes a file's path into a drawing (the file an imported part came from, kept with it in
PARTDEF, or the file File › Import › Merge Drawing… merges), it writes it relative to the drawing's
folder when the file is in that folder or a folder below it, with / between folders. Any other file (in a folder
beside the drawing's, say) is written as its full path: ../ paths aren't written, so whatever a drawing names outside
its own folder is plain to see. A drawing not saved yet names files by their full paths.
A drawing someone else made could use IMPORT or MERGE to read files on your computer. So when you open a drawing from a file and it would read files outside its own folder (and the folders below it), ParametrIQ asks first, once, listing them:
- Read Them opens it as it is.
- Open Without Them opens it without reading them: the statements that read them are left out, and so are the statements that needed what they would have made; each is listed in the Interactive window as a warning.
Files in the drawing's own folder are read without asking. Drawings you make or run yourself aren't asked about: statements you type or run in the Interactive window, and File › Import › Merge Drawing…, read the file you name, wherever it is.
The same goes for pictures, library parts and 3D models linked to their files rather than kept in the drawing: those outside its folder are asked about with the rest, and not allowed, they are drawn as placeholders. A drawing that fetches web addresses asks once more, listing the web sites. Saved in another folder (Save As…), a drawing's relative paths are written afresh so that they still name the same files.
Reverting
File › Revert to Saved goes back to the drawing as it was last saved, discarding the changes since (after asking, if there are any). It is there once the drawing has been saved. The changes can't be undone afterwards; the drawing's backups are untouched.
See also: CLEAR (empty the drawing back to a new one), Preferences, Drawing index, Drawings from other programs.