NAPs provides similar functionality as TD's built in Global OP Shortcuts, but for any family of operators. You simply create a short alias for the operator, then you can access it from anywhere in your network via
op.NAPs.OPS("your_op_name"). The "named" operator terminology is inspired by Q-Sys Named Components and Named Controls which allow users to access those elements externally, and, in fact, using NAPs allows users an easy way to expose operators to remote applications.
Navigate to NAPs/Build/NamedElements.tox and drag and drop the tox into your network; it's ready to use.
There are two ways to add operators:
Make the NAPs Component viewer active, then drag and drop your operator into the panel. You will be prompted to give your operator a name. Operator names can only contain letters, numbers and underscores, and cannot start with a number; they must also be unique. A popup will inform you if these criteria are not met.
Your name will be validated against the same criteria as drag and drop.
You will be able to access your operator and interact with it the same way you would using TD's built in
op() call, except NAPs uses
op.NAPs.OPS("my_constant").bypass = True
const = op.NAPs.OPS("my_constant")
# or consider a table
table = op.NAPs.OPS("my_table")
It's important to note that if you move the operator to a different part of the network, you will have to readd it to the NAPs module. If an operator is deleted from the network, NAPs will not sense this. However, you can use the Purge parameter to clear all deleted operators.
Deleting and Renaming Operators
You can delete operators from NAPs using the delete button in the interface, or with an API call:
You can also rename an operator from the interface by double clicking on its name or using an API call:
The component's parameters are sparse. The two most important are Purge, as mentioned, and Init Named Operators, which will simply clear the entire dictionary of
All names are also added to a drop-down menu in the Operator parameter. The Path parameter will reflect the full path to your selected operator. This is one easy way to get the path to your named operator, if so desired.
Note, however, that NAPs stores the actual operator object, so anything you can do with the
op() call, you should be able to do with the
OPS() call, including retrieving the full path.