ARIS Community - We Love BPM

How to delete OLE Objects and Comments?

jackchung's picture
by Jack Chung in Reports & Macros posted on 2012-05-17

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.

1792 Views
0 Likes
2 Comments
There are no attachments
misha19888's picture
by Misha Akopov posted on 2012-05-18

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()
raghuraj15's picture
by raghuraj singh posted on 2012-05-19

Nice report ..but will it remove templete also..? Thnx