Hi All,

I am struggling with a report in which I need to delete models from a group. I have developed a code its its giving me errors, error lines are marked in bold in the below code. Can someone please review the code and suggest me the correctives

var g_nLoc = 1033;

var g_oOutfile = Context.createOutputObject();

function main(){

 

  var oCurrentDatabase=ArisData.getActiveDatabase();

  var arrSelectedGroups = ArisData.getSelectedGroups();

  var arrSelectedmodels= ArisData.getSelectedModels();

 

 

  g_nLoc = Context.getSelectedLanguage();

  g_oOutfile.Init(g_nLoc);

 

   for( i = 0; i <=(arrSelectedmodels.length() - 1); i++){

  var modelGroup=arrSelectedmodels[i].Group();


   modelGroup.Delete(arrSelectedmodels[i]);

}

g_oOutfile.WriteReport(Context.getSelectedPath(), Context.getSelectedFile());

}

main();

 

 or register to reply.

Notify Moderator