Linked files and web addresses
Pictures, vector pictures, library parts and 3D models come into a drawing from other files. Each can be kept in two ways:
- Embedded (the usual): a copy of the file's content is kept inside the drawing. The drawing needs no other file, so it can be sent to someone, opened on another computer or run by the SaaS service as it is. Changing the file afterwards doesn't change the drawing.
- Linked: the drawing keeps only where the content comes from (the file's path, or a web address) and reads it every time the drawing is opened, and whenever you update its links. Change the file (a new version of a logo, a part drawn again) and the drawing shows the new one. The drawing stays small, but it needs the file to be there.
Any source can be a file or a web address (http:// or https://), linked or embedded.
Choosing when you insert
The tools and dialogs that bring content in have an Embed in drawing check box, ticked unless you clear it (your choice is remembered for next time):
- the Raster Image Tool and Vector Import Tool,
- the Part Import Tool,
- 3D › Models and Products › Import Model… (see Pages).
Each also takes a web address wherever it takes a file: type or paste it in the file box (it is fetched in the background, and placed when it arrives).
Changing it afterwards
Select a picture and the Source part of the Properties panel shows where it came from and whether it is embedded:
- File or web address: the source. Change it to link the picture to another file (an embedded picture only remembers it: Update reads it in).
- Embed in drawing: tick it to keep the last copy read inside the drawing; clear it to link the picture to its source (it needs one).
- Update: reads the source again.
Each change is one step to undo.
The Links dialog
Edit › Links… lists every source the drawing links: what it is (picture, vector picture, library part, 3D model), how it stands, and how many things in the drawing use it. Pick one to see its full path or address, why it couldn't be read, and when it was last read.
| Status | Meaning |
|---|---|
| Read | Read from its source; what you see is the source as it is. |
| Reading… | A web address being fetched. A placeholder is shown until it arrives. |
| Not found | The file isn't there, or the web address couldn't be fetched or isn't what was expected. |
| Not allowed | The drawing wasn't allowed to read it when it was opened (see Safety). |
| Old copy | The web address couldn't be reached this time: the copy fetched before is shown. |
- Update reads the source picked again; Update All reads every one.
- Embed keeps what was last read from the source picked inside the drawing; Embed All does so for every one. Use Embed All before sending a drawing to someone, so it needs no other file.
- Change Source… links everything that used the source picked to another file or web address (when a file has moved, say).
When a source can't be read
A linked source that can't be read doesn't stop the drawing opening. The picture is drawn as a grey dotted outline with its corners crossed and its source named in the middle, a library part shows nothing, and a 3D page shows its design without the model. Each one is listed in the Interactive window as a warning, and in the Links dialog. The drawing keeps the link: when the file is back, Update shows it again.
Web addresses
A web address is fetched in the background, so the drawing opens at once and fills in as the content arrives. What is
fetched is also kept in a cache in the app's data folder (PiQ/Links in your local application data), with the
server's version tags: the next time the drawing is opened the copy is shown straight away, and the server is only
asked whether it has changed. If the server can't be reached, the copy kept is shown (its status says Old copy).
Only http:// and https:// addresses are fetched. A fetch gives up after 30 seconds, a source bigger than 64 MB isn't
fetched, a raster picture must come as an image (a web page sent instead, as some servers do for "not found", is
refused), and no more than five redirects are followed.
Safety
A drawing someone else made could use links to read files on your computer, or to tell a web site that you opened it. So when you open a drawing from a file, ParametrIQ asks first:
- if it links (or imports) files outside its own folder, as it does for IMPORT and MERGE, listing them: see Files a drawing reads. Not allowed, those linked sources are drawn as placeholders;
- if it fetches web addresses, once, listing the web sites: Fetch Them opens it as it is; Open Without Them draws what they would show as placeholders.
What you do yourself is never asked about: the tools, the Insert dialogs, Edit › Links and the statements you type in the Interactive window read the file or address you give them.
Fetching is reading: it works while ParametrIQ is unlicensed (when drawings can be opened and viewed but not saved).
Moving a drawing
A linked file in the drawing's folder (or below it) is named relative to it ("art/logo.png"), so a folder of drawings
and their files can be moved or shared as a whole. When you save a drawing in another folder (File › Save As…),
those paths are written afresh so that they still name the same files.
In the drawing file
Each statement that brings content in takes two settings after its layer:
| Setting | Meaning |
|---|---|
SOURCE="…" |
Where the content came from: a path (relative to the drawing's folder, or full) or a web address. Kept for an embedded picture too, so it can be updated or linked later. |
EMBEDDED=FALSE |
Linked: the content isn't kept (it is written "") and is read from the source whenever the drawing is read. Left out, the content is embedded. |
RASTERIMAGE @1,P0,P1,P2,P3,"iVBORw0KGgo…",0,SOURCE="art/logo.png"
RASTERIMAGE @2,P4,P5,P6,P7,"",0,SOURCE="art/logo.png",EMBEDDED=FALSE
VECTORIMAGE @3,P0,P1,P2,P3,"",0,SOURCE="https://example.com/art/logo.pdf",EMBEDDED=FALSE
PARTDEF "Tab","","parts/tab.piq",EMBEDDED=FALSE
PAGE "3D","Page 1","","models/bottle.glb",EMBEDDED=FALSE
IMPORT "parts/lid.piq",[P4,P5],EMBEDDED=FALSE
A library part names its source as its third value, and a 3D page its
model as its fourth; a 3D page's model kept in the drawing is written DATA="…". IMPORT with
EMBEDDED=FALSE places a linked part or vector picture. MERGE is never linked: what it merges
becomes the drawing's own, to change.
See also: RASTERIMAGE, VECTORIMAGE, PARTDEF, IMPORT, Saving, Web addresses in the SaaS service.