A molecular scene can become difficult to read when visual models are hidden, invisible, or simply not the objects you meant to inspect. The confusing part is that these states may look similar in the viewport, but SAMSON’s Node Specification Language (NSL) lists them as separate attributes. Knowing which property to query can make a visual-model search more precise.
This guide focuses on the visual-model attribute space, whose short name is vm. Expressions in this space match only visual model nodes. That scope is useful when you want to inspect visual models without mixing them up with other kinds of nodes.
Start with the state you want to check
For the visible attribute, use vm.v to match visual models where it is true, or not vm.v to match those where it is false. The full attribute name is visible; v is its short form.
The page also lists hidden, with the short form h. Its examples are vm.h and not vm.h. Because visible and hidden are distinct attributes in the reference, query the one that describes the condition you are investigating instead of treating the names as interchangeable.
A useful troubleshooting habit is to check one property at a time. If your concern is whether a visual model is marked visible, try vm.v and then not vm.v. If you specifically need to inspect its hidden state, use vm.h or not vm.h. Keeping these questions separate makes it clearer what each result represents.
Keep selection separate from visibility
Selection-related attributes are another source of confusion. The visual-model space includes selected and selectionFlag. The documented examples for selection are vm.selected and not vm.selected. For the flag, they are vm.sf and vm.sf false.
These attributes are not listed as visibility attributes. If you are trying to find visual models based on whether they are selected, use the selection expression; if you are investigating whether they are visible, use vm.v or not vm.v. This simple distinction helps avoid searching the wrong state when a scene does not look as expected.
One detail worth remembering: selected has no short name in the visual-model attribute space. Although the inherited node attribute has the short name s, the visual-model reference explicitly says that this short name is not available here. Use vm.selected, not vm.s, for this attribute.
Use names and inherited attributes when needed
Visual models also inherit several attributes from the node attribute space. For example, name can be written as vm.n and takes strings in quotes. The reference gives vm.n "A" and vm.n "L*" as examples. It also lists hasMaterial (vm.hm) and ownsMaterial (vm.om), each with true-or-false values. These can help you narrow an inspection to a particular kind of visual model property, rather than relying on appearance alone.
In practice, begin with the attribute that matches your question, use the documented short form where one is provided, and keep separate checks separate until you know which state matters. For the complete attribute list and examples, see the visual model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at www.samson-connect.net.
