Hi,
I want to create a list (or array) with all the elements that have a specific property as defined in the profiling settings.
For this I wanted to use the finder with the find() funtion. However, this did not seem to work for me:
var finder = Global.getFinder(selection[n]);
var LRUs = finder.find("user_level", "2");
I can iterate trough all elements and use .user_level to fetch the value, so it should be a working parameter. Following code works, but I would like to be spared of creating my own array for every parameter.
var blocs = Global.getFinder(selection[0]).findByType(Metamodel.sysml.SysMLPart).asArray();
for (var i = 0; i <blocs.length; i++) {
if ((blocs[i].user_level == "2"){
...
}
}
Best regards.