JC
Hello,
How can I delete OLE Objects and Comments from selected models? Because I have around 1000 models with OLE Objects and comments and delete it one by one would be too much work.
If any script could do this would be better.
Could someone help me please?
Thanks.
Regards,
Jack.
Hi Jack,
I had the same task and I wrote the following code.
This will delete all free-form text-s in model.
Be carefull because, in our models we have headers that
contain model name, creator of model and tese attributes are also free-form texts and they will be deleted.
so I have this check :
texts[j].Y()>1000
to ensure that the text is bellow 1000 (bellow header). Try this :
var group=ArisData.getSelectedGroups()[0]; var models=group.ModelList(true , Constants.MT_EEPC); var output=Context.createOutputObject(); for (var i=0; i<models.length; i++){ var model=models[i]; var texts=model.TextOccList(); for(var j=0; j<texts.length; j++){ var attrOccs=texts[j].AttrOccList(); if(texts[j].Y()>1000){ output.OutputLn(texts[j].Y() +model.Name(1033) , "Sylfaen", 12, Constants.C_GREEN, Constants.C_WHITE, Constants.FMT_LEFT, 0); texts[j].Remove(); } } } output.WriteReport()