Hi!
I am trying to execute a Parameter Scan by using the API within C# language.
The lines from 51 to 58 are specifically to overwrite the default values when I set the "settings of the scan" (lines 45 & 46): [Program-cs.png].
The generated task in the model (model.cps) is very similar to the one created when I use CopasiUI program, except the specific 'Common Name' value element named 'Object' (line 11870): [model-cps.png].
According to the current source code of the COPASI (in C++), I suppose I can use at least two more ways to overwrite its value: [CScanProblem-cpp.png].
First option: by sending the 'Common Name' value as part of the 'CDataObject' argument of the method 'CScanProblem.addScanItem'. This approach is supported by the C# version, however, even if I try to set a dummy 'CDataObject' object with specific 'Common Name' value, the final value in the model is not the same as the one I set in the 'CDataObject' dummy object: [CScanProblem-cs.png].
Second option: by using the method 'CCopasiParameterGroup.addParameter'. According to the C++ code, the third argument can contain its value, however, in the C# version this third argument can only be a "flag": [CCopasiParameterGroup-cs.png].
So, my first question: what is the correct way to overwrite the default value (empty string) of that element?
Also, I have another doubt: when I try to "process" programmatically the task (even if I manually set the value of the element that I am not able to do it via API -as I explained before- in the CPS file and load the model from it) its result is always a False value (so the task is not running as expected): [process-cs.png].
I already tried by invoking the 'CScanTask.getProcessError' and 'CScanTask.getProcessWarning' methods to get some info, but both of them return empty strings. Notice that the "settings of the report" (not included in the screenshot of my C# code) generates the elements in the model (model.cps) as same as when I use CopasiUI program.
Then, my second question: how can I check the reason the task's "process" is returning a False value?
Thanks in advance.
Regards.