Hi Dojo,
I will need to set value to column write parameter from automation script. In my case I have read/write column parameters and write parameter use snmpSetAndGet.
<Param id="504" trending="true"> --> Read column parameter
<Param id="505" snmpSetAndGet="row;executeNext"> --> Write column parameter
I will need to set 505 parameter from automation script but I didn't found any method that can do set on write parameter. Is there any solution for this case without creating more logic on protocol side which will do snmp set via QAction?
Hi Dario,
if I understand your situation correctly, you want to set one cell via the write parameter in an automation script?
if so, did you already checked the possibility via the following:
Element el = engine.FindElement( dmaId, elementId);
const int ReadParam = 504
const int WriteParam = 505;
el.SetParameterByPrimaryKey(el.GetWriteParameterIDFromRead(ReadParam, pk, value )
or
el.SetParameterByPrimaryKey(WriteParam, pk, value);
I would recommend to only use this solution if it is a single update, if you want to update multiple parameters or cells a better way to go is either via Interapp solution or via a single param that can contain for example a json with the values. That way the communication between automation script and the protocol is done with the absolute minimum interaction.


I tested this approach and it's possible to set write column parameter (and also trigger SNMP set on colum write parameter) from script.
element.SetParameterByPrimaryKey(element.GetWriteParameterIDFromRead(readColumnPid), pk, valueToSet);
Hi Thomas, you understood correct.
Element class contains only GetWriteParameterIDFromRead() method that takes one parameter (parameter id or parameter name) and it is related to standalone parameters.
I think it's even not possible to trigger write column parameter from QAction. So, if we need to trigger SNMP Set on column write parameter externally, only way to do it is via SNMP Set from QAction itself