Audacity and Nyquist are two separate programs. The Nyquist interpreter runs as a “subprogram” inside Audacity. The plugin header lines (starting with a semicolon at the top of the plugin code) are parsed by Audacity (not by Nyquist) while building the plugin GUI window. Audacity cannot recognize Nyquist variables, because at that time the Nyquist interpreter still is not running.
AFAIK there is no way to use variables for initializing slider or other values in the plugin header lines.
What I am actually trying to do is use a variable stored in scratch from another pluton and use that. Can Audacity see the scratch variables at all? Is this a possible mechanism to get this to work?
You can’t have a value of scratch display in the plug-in GUI, but you could have an option in the GUI to “Use scratch value if available”.
In the plug-in you can then test for the existence of your scratch variable, and if it exist, use that, else fall back to the GUI supplied value.