Hi All,

Can you please help me to remove an object from Database through script? I have written a script using "Remove" function and it is removing the objects from the model.

However if I go to "Explorer" window I can see still the objects are lying in the folder but not in the model diagram. Does anyone faced this kind of issue? Below is the code snippet.Thanks in advance.

    var documents = models.ObjOccListFilter(Constants.OT_INFO_CARR);
    if(documents)
    {
       for(k = 0; k <= (documents.length-1); k++)
       { 
          var lstDoc = documents[k];
          if((lstDoc.getSymbol()==892)||(lstDoc.getSymbol()==1649)||(lstDoc.getSymbol()==1650))        
          {  
             lstDoc.Remove();
          }
       }    
    }

Best Regards,

Srinivas.

 or register to reply.

Notify Moderator