Hi,
i'm trying to access the property evaluatedFor of the Metamodel.dc.DCFailureModeEntry type through a script, so i can perform some custom calculations, depending on safety goal and variants (unfortunately the Metrics section cannot help me there).
We're using DC Worksheets with individual metrics activated.
The following snipped finds elements and saves them in the array (the console.log results in a certain number of elements), but the evaluatedFor property is empty (console.log output: "[ ]").
function spfViolation_true(element) {
//console.log("entering spfViolation_true");
if (!element) {
//console.log("!element");
return false;
}
if (!element.spfViolation) {
//console.log("!element.spfViolation");
return false;
}
//console.log("return true");
return true;
}
var spf_FMs = Global.getFinder(selection[0]).findByType(Metamodel.dc.DCFailureModeEntry, true).filter(spfViolation_true).asArray();
console.log("Found " + spf_FMs.length + " elements");
console.log(spf_FMs[0].evaluatedFor)
function spfViolation_true(element) {
//console.log("entering spfViolation_true");
if (!element) {
//console.log("!element");
return false;
}
if (!element.spfViolation) {
//console.log("!element.spfViolation");
return false;
}
//console.log("return true");
return true;
}
var spf_FMs = Global.getFinder(selection[0]).findByType(Metamodel.dc.DCFailureModeEntry, true).filter(spfViolation_true).asArray();
console.log("Found " + spf_FMs.length + " elements");
console.log(spf_FMs[0].evaluatedFor)
Is there any way to access this property through a script like this?
Also the property appears as <not set> when using the "Diagnose->What is this?" tool, although the Evaluation group is not empty.
I'd be greatful for any help.
Regards,
Lukas