Filter System Objects and Trace Results
//Get all the Macros, Reaction and Scripts objects
var filter = new Filter();
filter.discipline = new DisciplineFilter(0);
var objects = searchSync(filter);
if (objects == null || objects.length == 0)
{
console(" objects not found");
terminate();
}
traceInfo("Objects count = {0}",objects.length);
//For each element returned by the searchSync, read and print
for(var i = 0; i < objects.length; i++)
{
var obj = objects[i];
traceInfo("\t : {0}, {1}, {2}",[filter.discipline,i, obj]);
}