Manually linking annotation files, and other annotation file link questions


tl;dr: the note I made for myself before this post:
“Not clear how to link a file as an annotation, or how to fix annotation links if they get lost. Check of devontechnologies user forum also doesn’t really contain that.”

Pleased to have found DEVONthink a couple of years back, my wife and I have been slowly migrating towards a complete document management system with a parallel paper/backup system as well. In recent months we’ve been scanning a preexisting set of paper files arranged in an adaptation of the US Navy filing manual 5210.1.

Now, in order to re-organize our existing digital files into this structure, I find myself merging several separate satellite databases into one, so that each file may be replicated into the new location(s) but also be accessible in the old digital file structure, so that we aren’t totally lost during the probably months-long transition.

In doing so, I’ve been selecting all satellite database contents at once and moving to the new location, in order to keep any replicant structure already existing in the satellite database rather than end up with duplicates (though to be honest, I haven’t checked whether there is sufficient magic at work that replicants moved at different times will still show up as replicants in the target database; seems like this might actually work).

Everything has gone exactly correctly, except for links to annotation files. In some cases, the annotation files are moved but they do not show up in the annotation inspector on the annotated file (even though it did work before moving to the target database). I’ve had a set of so-far-confusing-to-me loss of links from files to their annotation files that seem at odds with the “location doesn’t matter” comment in the " Annotation File Re-Location?" thread. I won’t go into detail about right here, but could spend some time recreating/describing in more detail if that would be helpful.

But really this post is more about a few questions about the use of annotation files. Having started to do it a little more, I can imagine relying on this feature heavily, but I also expect to need to be moving large subsets of documents between databases for at least a while, and want to understand how it should/can work.

  1. Is there a way to manually specify a file as the annotation, rather than needing to create it through the Annotations inspector? If this was a clear option, I probably wouldn’t have gotten to the point of making this post. Also- I can imagine a time (and even specifically formulate a use case or two) when I would want to do this when importing data and their annotations from paper or another outside-of-DEVONthink source, very similarly to the desire expressed in the “Broken links in annotations” thread.
  2. Not quite the same, but is there a way to see from a file what its annotation link is? I know it is possible to reveal or open the annotation from the Annotations inspector, but any way to get it to show up in the Links inspector? It’s a little bit similar to the request in “Annotation incoming links missing”, but I’m interested in the link showing up on the document being annotated, rather than the annotation document.
  3. Is it possible to have multiple annotation documents for one file? I understand that more or less this can be accomplished by putting links in the annotation document, just trying to understand both limits and suggested/intended use.

That’s it for now. Kudos and appreciation to the whole DEVONteam for outstandingly functional and sane product and support!

Welcome! Others will be able to expand on this, but the very quick answer is “not really” to 1 & 3, and “yes” to 2.

  1. As I understand it (which may be not at all), the link between a file and its annotation is stored in the database rather than anywhere in file metadata, so that if you want to set an existing file as the annotation to another file, you have to create a new annotation in the inspector and paste the contents of the existing file into that.

  2. Control-8 will take you to the Links tab of the Document inspector, which displays outgoing links in the upper pane and incoming links in the lower. The latter will show the annotation file.

  3. No, though again there are partial workarounds of the kind you mention; you can do quite a lot with links and transclusions in the main annotation file.

Thanks @NickLowe

On my setup this only shows if there is explicitly a backlink in the annotation file. Is that different from what you see?

On 1, if you copy and paste the item link of a document into the URL field of the intended annotation file, it will link the two in that relationship. And no, you can’t have more than one annotation file per document.

1 Like

Yes and no – if there’s a backlink in the annotation file (as normally there would be, unless it’s created from a custom template without a backlink placeholder), it’ll show in Incoming Links with a DT icon and just the title of the annotation file. But if you then delete the backlink from the annotation file, it still shows up in Incoming Links with whatever your default editor is for that filetype and (if it’s a Markdown file) with the full link text in Markdown link format. If you then restore the backlink, Incoming Links will then display both versions of the link.

@Bluefrog’s trick with the URL field is new to me, and potentially very useful. It looks as if the association created by this route is slightly different from the result via the regular method, where the URL field of annotation files is empty. The URL field method doesn’t result in a displayed link back to the document in Incoming Links, unless you manually add a backlink in the annotation file.

1 Like

I’m not sure I understand. If I paste a link in the url field, I can jump from that document/tag/group to the destination of the link.

Once there, I see the incoming link in the inspector. The annotation still appears to be available. (Which is nice).

I haven’t used the URL field in a long time. I clearly need to take more advantage of it.

Yes, it doesn’t work if there’s already an Annotation file. (Also, it’s the other way round from @BLUEFROG’s version: you paste the item link for the intended Annotation document into the host document’s URL field, not the host document’s into the Annotation’s one.)

Try this: select a Word document (!!) and Copy Item Link; paste the link into the URL field of a document that doesn’t currently have an Annotation file; then switch to the Annotations inspector tab. You may need to do a bit of saving and refreshing, but an editable version of your Word document will now show in the Annotations pane.

Now try this: select a different document, create a new Annotation in the inspector in the usual way, and then paste your same item link from the Word document into the URL field as before. The Annotations inspector will still show the original Annotation, not the Word document. But if you now delete the Annotation, you’ll find that the Word document’s URL has disappeared from the URL field. Paste it back and switch to the Annotations tab, and now you’ll find your Word document showing as the Annotation. Select Remove in the Annotations drop-down, and it’ll disappear from both the Annotations pane and the URL field, but (unlike with Remove on Annotations created in the inspector) the Word document itself will not be deleted.

This is an amazing thing. It may even be a bug, but if so it’s a bug that’s a feature. (I’ve used a Word file as an example, but of course you can also do the trick less dramatically with rich text or Markdown files.) Among other things, it enables you to have the same Annotation file shared by more than one document; to have Annotations in Word rather than just plain or rich text; and to use the Annotations pane as an editor for other documents. It also, as you’ve already noticed, gives you a useful “Go to” link at the top of the Preview window, which will open the pseudo-Annotation document in a new window. You can’t, so far as I’ve found, use a Word document as an Annotation template, or do the same trick with HTML, OmniOutliner, or Scrivener documents (hey, it was worth a try). But it’s still a great hack.

1 Like

In the end it’s due to compatibility to annotations created by a smart template of version 2.x.

1 Like

I got it to work with a text-based document.

Excitement got the best of me. I tried to use a MindNode file as an annotation.

However, since the URL shows up above the preview/edit pane, that link isn’t terribly different from a linked annotation.

It would be cool to have multiple URLs. On the other hand, a conventional annotation file can do exactly that along with any commentary you might want about why the links are there.

Do you mean in the inspector generally? (This thread is melting my brain a little so apologies if I’ve misunderstood your request.) If so, you can just create as many custom fields as you’d like, and they will display in the inspector pane. Go to Settings > Data then in the column on the left you can click the plus sign to add as many custom metadata fields as you like, and choose URL as the Type. Then you’d end up with as many URL fields populated as you’d like (well, I assume there is a limit, but I don’t know what it is!).

I don’t have this set up for URLs, but I have it set up to link related files in my databases, and it creates a dropdown menu where I can click on files to link them. It looks like this in the inspector:


Great tip!

Nice! Or… create a Rich Text custom attribute. Copy an item link and paste it into the field in the Custom Info inspector. You’ll see the document’s name as an active hyperlink!

Have the document and its inspector open in a window, Option-Command-drop a document into the custom field to insert a link. :slight_smile:


Note: @MsLogica’s approach is more useful if you’re displaying custom metadata headers in the item list.

1 Like