Find the note you need: a practical guide to SAMSON’s note attributes

Notes can be useful for recording decisions, marking questions, or keeping track of details in a molecular model. But as a project grows, the same notes can become harder to locate: some may be hidden, some visible, and some may have names that are easy to overlook. SAMSON’s Node Specification Language (NSL) provides a way to describe note nodes using attributes, so you can narrow your focus with concise expressions instead of relying only on memory.

This guide focuses on the note attribute space, whose short name is nt. It matches only note nodes. That scope is useful when you want an expression to concern notes specifically, rather than other kinds of nodes in a scene.

Start with the note’s state

If your immediate problem is visibility, the note attributes visible and hidden give you two ways to express what you are looking for. The documentation lists these examples:

  • nt.v matches the visible attribute with its value set to true.
  • not nt.v expresses the opposite condition for visible.
  • nt.h refers to hidden.
  • not nt.h expresses the opposite condition for hidden.

These are useful distinctions when a note seems to have disappeared from view or when you want to focus on notes with a particular visibility state. The attributes are inherited from the general node attribute space, so they are not unique to notes; the nt prefix is what keeps the expression focused on note nodes.

Use names to narrow the search

Notes can also be identified by name. The short name for name is n, and values are written as quoted strings. For example, nt.n "A" refers to notes with the name A. The reference also gives nt.n "L*" as an example of a name expression.

That makes naming a practical part of keeping a busy model understandable. If you use a consistent naming convention for notes—such as a short prefix for a type of reminder—you can later describe that group by name. The documentation shows the expression format; it does not prescribe a naming convention, so choose one that suits the way you organize your work.

Check selection-related attributes

For selection-related checks, the note attribute space includes selected and selectionFlag. The documented forms are nt.selected, not nt.selected, nt.sf, and nt.sf false. One detail that is easy to miss: selected does not have the short name s in the note attribute space. The full form is available, while selectionFlag uses the short name sf.

The corresponding visibility flag is visibilityFlag, shortened to vf. The reference examples include nt.vf and nt.vf false. These flags are distinct attributes in the reference from visible and hidden. When you need a particular condition, use the attribute that describes that condition rather than assuming the names are interchangeable.

A small reference for everyday use

  • Visible: nt.v or not nt.v
  • Hidden: nt.h or not nt.h
  • Name: nt.n "A"
  • Selected: nt.selected or not nt.selected
  • Selection flag: nt.sf or nt.sf false
  • Visibility flag: nt.vf or nt.vf false

A useful habit is to begin with one attribute that matches the problem you are solving: name, visibility, selection, or a flag. The note-specific prefix makes the scope explicit, and the short names can make repeated expressions more compact. For the complete attribute list and details about inherited node attributes, see the SAMSON note attributes reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.