Hi all
I have a doubt about how to set up an MP on a spectrum analyzer client via script.
I see a question here in the dojo that helps me a lot to understand how to customize the MP.
But my question is about, how I can set this MP on the client (cube or Low-Code App) via script?
The method SetMeasurementPoints seems to receive an entire list of MPs, but it now gives the possibility to set one of them, and if I miss passing another MP in the list, it will delete the already existing in the spectrum analyzer.
Edit to explain better my idea:
At the moment in the MP i setup only the input port, and via script I want to "tick" the MP on the client that could be the Cube or Low Code App. (Below an image to explain better)
So my point is to "active" one of this MP via script, is something possible?
Hi Marco,
You are correct: the SetMeasurementPoints method does expect definitions for ALL of the measurement points at once and will consider previously existing measurement points that do not appear in the new data as deleted.
There is currently no method to add or update a single measurement point.
Best approach here would be to call GetMeasurementPoints first and then extend/update the data returned from there. This updated data can then be sent back through SetMeasurementPoints. This will make sure that previously existing measurement points keep their configuration.
As far as I remember, the "object" type output of GetMeasurementPoints can be cast to object[] where each entry in there can be cast to string[], which is the same format as what SetMeasurementPoints expects as input.
Unless I’m missing something, where the automation script is being launched from (Visio/LCA/directly from automation/scheduled/…) doesn’t really matter here?
From the automation script you should be able to fetch all measurement points / make updates and re-apply the updated set
Hi Wouter
You are right, from where the script are launched is not the point, but if there is the possibility to “set active” one MP, anyway I update my question to explain better my case
Hi
Yes my approach at the least is the same you suggest, so retrieve all the MPs, search the one I need and change it, then upload the entire array of MPs as I received, but in case I would also give the possibility to the user to enable one specific MP on Cube/Visio or LCA? this is possible via script?