A crowded molecular scene can make a simple task surprisingly slow: finding which visual models are visible, which are hidden, or which have a particular name. Clicking through nodes one at a time is not always the quickest way to narrow things down. In SAMSON, the Node Specification Language (NSL) lets you describe the visual models you want to match using attributes in the visualModel space, abbreviated vm.
This is useful when you want to express a condition clearly and repeat it later. The key is to choose the attribute that corresponds to the question you are asking, rather than treating every visual-state attribute as interchangeable.
Start with the visual-model scope
A query beginning with vm targets visual model nodes. For example, vm.v is the documented expression for the visible attribute, while not vm.v expresses its opposite. These compact expressions can help you focus on visible or non-visible visual models without having to inspect every node manually.
If you are troubleshooting a model that seems to have disappeared, checking both sides of this condition is a practical first step:
vm.v— visual models whosevisibleattribute is true.not vm.v— visual models whosevisibleattribute is false.
The same pattern is available for hidden: use vm.h or not vm.h. The documentation lists visible and hidden as separate attributes, so use the one that matches the property you intend to inspect.
Use names to narrow the search
When you know a visual model’s name, the inherited name attribute can make a query more specific. Names are written as strings in quotes. The documentation gives vm.n "A" and vm.n "L*" as examples. That makes a name-based condition a useful companion to a visibility condition: one describes what the node is called, and the other describes its visible state.
For example, you can examine the documented expressions vm.n "A" and not vm.v separately to narrow down a search by name or visibility. The reference page does not define how multiple conditions should be combined, so check the broader NSL syntax documentation before constructing a compound expression.
Know which state you are asking about
The visual-model attribute list includes several Boolean attributes that can look similar at first glance: selected, selectionFlag, visibilityFlag, visible, and hidden. The reference confirms that each is an available attribute, but it does not describe their operational differences in detail. For reliable queries, use the exact attribute named for the condition you want to test, and consult the linked node-attribute documentation if you need to understand inherited behavior.
Short names can make expressions quicker to type: v is the short name for visible, h for hidden, n for name, and sf and vf for the selection and visibility flags. One useful exception to remember is selected: in the visual-model attribute space, it has no short name. Use vm.selected, not an assumed abbreviated form.
A small checklist for clearer queries
- Begin with
vmwhen you mean to match visual model nodes. - Choose the attribute that names the property you want to inspect, such as
visible,hidden, orname. - Use
notfor the opposite of a Boolean condition, as shown in the reference examples. - Put name values in quotes, and use only syntax supported by the NSL documentation.
- Remember that these visual-model attributes are inherited from the general node attribute space; the visual-model reference identifies which attributes and short names are available here.
These small distinctions can make scene inspection more deliberate: instead of asking “Where did that model go?”, you can check the specific visual-model property that matters and refine your search from there. For the full attribute table and links to the inherited definitions, see the visual model attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
