Hey everyone,
I'm developing a ProfileLoadScript for a SRM solution.
There are some actions that I need to perform in the element that generates the resource (because not all the parameters are exported to the function DVE). What's the best way to get an element reference based in a Resource ID?
Dear Bruno,
If you are using Function Resources and not "normal" resources, you can cast it to a FunctionResource and in there, you have the Main DVE DMA Id and Main DVE Element Id. Having both, you can use FindElement on the engine with those parameters and do the logic you need.
Hi Bruno,
A profile-load script is supposed to apply a profile on a function DVE, nothing more.
If possible, I'd suggest to extend the function definition so that the missing parameter is part of the function. Is that an option ?
Based on the use case you’re indicating, retrieving the main Element seems to be the correct approach.
Hi Bruno,
With below code you have the element info independent if you're working with Function Resources or Virtual Function Resources
Yes, it’s an option.
This is for a router function. Goal was to create a resource per input and per output, so we were not including the Matrix parameter with all inputs and outputs to the resource DVE.
However, to execute the ConnectMatrixCrosspoint call, we need an element reference (that includes the Matrix), not the resource. So, indeed adding the Matrix parameter to the resource would solve, but not sure if that’s coherent.