I am creating a RW Add-in and I wonder if it is possible to have custom system parameters for some of the setting for my Add-in.
Today all settings are stored in persistent variables, and while that works fine, I just think it would be more clean to have system parameters for some of my settings.
For now I use RW 6, but if there is a difference I am also curious about RW 7
You can create custom systemparameters in the system with your addin.
It’s well explained in the manual with examples of different datatypes (picklist, bool, array).
I have attached the manual for you.
I also attached 3HAC070207-001.pdf which is for RW7.
To read the values of these parameters you use standard rapid instruction ReadCfgData.
However, I am not sure if I think it is very well explained at all. I had already checked the manual before asking here, and I have tried making some parameters with guidance from the manual, but I just can’t get it to work.
Let’s say I want to create a parameter that lets my addin code know if and how a certain procedure should run.
We can call the parameter RunProcA and the value could range from 0 to 2 depending on how the procedure should run. Now from the manual I figured out that the parameter should look something like this ‘-name “RunProcA” -value 1’
So, here are the specific questions that I cannot find in the manual.
Which domain do I use? Is there a specific one that I must use or can I choose freely? The ones I have tried does not work.
Which type? Again, can I just name my own type or must I choose from existing types? I always get Illegal type name - error if I try to set my own type
Any help is greatly appreciated as, at least for me, the manual does not cover it.
Thats the PROC.cfg file when exported from the controller.
To answer your questions.
Which domain do I use? Is there a specific one that I must use or can I choose freely? The ones I have tried does not work.
I have never had problems using freely that domain to use.
I can even create my own topics.
Which type? Again, can I just name my own type or must I choose from existing types? I always get Illegal type name - error if I try to set my own type
Types can be bool,string,int,double,combobox or radiobutton selection.
I am facing the same problem as Markus.
I have checked both pdf’s “3HAC051193-001” and “3HAC070207-001” and could not even find anything about how to let the controller know my user-defined cfg-domains or cfg-topics.
Which chapter is it in?
Having simply copied the “HUHUH_Settings” to the PROC.cfg and attempting to load it to a RW7 VC, I got the ELOG message “120019 missing instance name in cfg file”
I solved it in the end by a lot of trial and error and by dissecting different function packs. I can dm you my solution and you might be able to solve it from that. But I never found any documentation on how to do it, I don’t think it is intended.
Also, I have not tried this solution on RW 7, so it might not work for you at all?