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,
As far as I know, this is not possible via the API.
In DataMiner Cube a workaround is possible by making these configurations:
- In the spectrum element, enable "visualize measurement points" from the "measurement points" tab in the ribbon
- In the "Card" tab of the user settings, select "Open spectrum Analyzer" as "Default opening behavior for cards showing measurement points"
That way, you will get a list of measurement points in the surveyor:
Opening one of these measurement points will open up your spectrum element with the measurement point already selected:
These measurement point cards can also be included in workspaces for easier opening together with other cards.
As far as I know, there is no similar method to do this in low-code apps.
Hi Marco,
this may depend on how your script is treating the existing MP’s. To handle this correctly, you need to first read the existing MP’s, add or edit the ones you want to change and then send a message back that includes the existing + new MP’s. That way existing services should not be deleted. Next to the question you linked, please also take a look at https://community.dataminer.services/question/preselecting-measurement-points-script/. I’ve posted a code snippet there that encapsulates the messages in a class and might be easier to use.
Hi Michiel
I already tried with the MP as service, but never got the point you suggest, it could help for sure, anyway I tried to create and delete vai script few MPs, but when the script end the execution, all the services created for each MP are gone. so if some else using one of that service, and the script start, that service will be deleted.
I’m thinking to use the MPs to have access to different input ports, and try to create preset via scripts to set the propertys.