Export & Handoff

Links and search

Every layer in Nox has an address. Copy it and paste it into a message, a ticket or a note beside the code, and whoever clicks it lands on that layer, selected and filling the view. Paste it to an agent and it knows exactly which layer you mean. The search field in the top bar takes the same addresses, and words too.

Words typed into the search field, and the layer they found
Words typed into the search field, and the layer they found
By hand
  1. Select one layer, or several.
  2. Choose Edit › Copy Link to Selection (⌘L). Or right-click it on the canvas, or its row in the Layers list, and choose Copy Link.

What is copied is one line, a link and nothing after it:

nox://open?file=/Users/you/Design/Weekly.ndf&node=73bfdbd3-8bb6-81c0-91ee-ddd200000006
  • file is the document's place on the Mac.
  • node names the layer, by an id of its own that never changes. Renaming, moving or restyling the layer does not break the link. Several layers selected give several ids, with commas between them.

Copy Link works in all three modes, and it changes nothing. With nothing selected, it beeps.

Click a Nox link wherever it shows as a link on the Mac, or paste it into Nox's search field. Nox comes to the front, shows the layer's page, selects the layer and fills the view with it.

  • If the document is open in a window, that window comes to the front.
  • If it is not open, Nox opens it.
  • If the file is not where the link says, nothing is made.

A link holds the document's place on your Mac. A teammate whose copy of the file is at another place can paste just the id after node= into the search field of that document: an id alone names a layer of the document in front.

The search field is at the right of the top bar, before the zoom. It is there in every mode and in Nox Free, and it changes nothing.

The search field in the top bar
The search field in the top bar
By hand
  1. Press ⌘F (Edit › Find…), or click the field.
  2. Type or paste, and press Return.
  3. Press Esc to give the keys back to the canvas.

What you type decides what happens:

You typeWhat happens
A link, nox://open?…Nox goes there, as if you had clicked it. Quotes or brackets a message put round it are ignored
A layer's id, such as 9:4, or several with commasNox goes to that layer of this document
WordsThe layers whose names have every one of the words, and the texts that say them, whatever they are named

Words find the layers of the page you are on first. One found is gone to at once. Several are listed under the field, up to twelve, each with its page where that is another; choose one to go there. Nothing found, or a link to a layer that is not there, gives a beep, and nothing changes.

Searching for what a text says is often quicker than finding its layer. Type view report and you land on the button's label, whatever the layer is called.

Note

On a narrow window the field gets shorter, down to 120 points wide. Narrower than that it is hidden, and ⌘F beeps.

Paste a link into your message, and the agent works on that layer and no other:

Make this button match the primary one:
nox://open?file=/Users/you/Design/Weekly.ndf&node=73bfdbd3-8bb6-81c0-91ee-ddd200000006

Every tool that takes a layer's id also takes a link to one layer in its place, and every list of ids takes a link to several. To see what a link names first, the agent calls resolve_link:

{ "link": "nox://open?file=/Users/you/Design/Weekly.ndf&node=73bfdbd3-8bb6-81c0-91ee-ddd200000006" }
{
  "file": "/Users/you/Design/Weekly.ndf",
  "nodes": [
    {
      "id": "300867026:6",
      "kind": "frame",
      "name": "Button",
      "path": ["Page 1", "Home", "Card", "Button"],
      "page": { "id": "300867026:1", "name": "Page 1" },
      "box": { "x": 48, "y": 236, "width": 124.36, "height": 42 },
      "on_active_page": true
    }
  ]
}

id is the short id the tools use. Ids that are not in the open document come back in missing.

Find through an agent#

find searches the document. Every condition given must hold: name and text match anywhere in a layer's name or in what a text says, ignoring case, and kind is exact (frame, text, instance, component, and so on). under keeps the search inside one layer, and limit sets how many come back (50 by default).

Find every text that says "view report", and change it to "Open report".

The agent calls find with:

{ "text": "view report" }
{
  "matches": [
    { "id": "300867026:7", "kind": "text", "name": "Label", "text": "View report" }
  ],
  "more": false
}

more is true when there were more than limit. With in: "library", find looks through the components the linked libraries offer instead: see Libraries.

Name layers for what they are, such as Button, Title and Price, and both you and the agent find them by name in one step.