Changing parameter value from CPlusPlus DLL

Is there a way to set parameter’s value from a c++ module?

I have 2 thing I try to do:

  1. I want to create custom parameters that control multiple outputs (channels). Each output will have a few parameters (same parameters for all the inputs), and the idea is to put a menu parameter, with which you can select which output the parameters will affect. I order to do so, I need the parameters to change every time you select a new output (to load current settings for this output).

  2. I have a parameter which is quantified int - can only be set to multiplies of 4. I want it to change to nearest legitimate value when changed by user.

Thanks.

We currently don’t have a way of directly changing the parameters from inside the C++ operators, but one workaround may be to use a Parameter Execute DAT pointing to the operator, and manually changing all the parameters when this menu changes.
But you still may find yourself getting into problems, if user of your node ever decide to export to these ‘banked’ parameters, or even use simple expressions with one.
Is it feasible to simply include multiple groups of these parameters, and enable/disable accordingly?

Rob, then I have a related question: is it possible to disable/enable a custom parameter from C++?

Hi and thanks.
That’s what I do now - create groups of parameters and enable/disable them as needed (yes, nettoyeur, it’s possible and really simple and useful).
Problem is, I came to a point I need the parameters to control 64 channels, so it will be really cumbersome. I wondered if it’s maybr possible using the pointer to the main window (HWND mainWindowHandle) - use it and the opPath to indirectly change the parameters (maybe create a python script?).
But I couldn’t find any documentation about the mainWindowHandle…

Anyway - it would be great to have this option in future versions.

Ah great. sorry to break into your thread again, but can you tell me how to disable a custom parameter in C++? I can’t seem to find the option in the api.

in the execute() function, you can call inputs->enablePar(), with parameter’s name. for example:

inputs->enablePar(“Fullscale”, 0); // disables parameter named “Fullscale”

NICE. Thank you so much!