ARIS Community - We Love BPM

How to replace a picture/bitmap to a model using script?

pperri's picture
by Patrick Perrin in Reports & Macros posted on 2012-01-06

Hello All,

I am writing a report (running over a group of models) that will replace for each model an old company logo by a new one, but I'm not finding a way to replace a bitmap or a picture for all models within ARIS via a script.

Thank you very much in advance for your help.

Patrick

235 Views
0 Likes
4 Comments
There are no attachments
VladoB's picture
by Vladimir Bis posted on 2012-01-09

Hi Patrick,

did you insert logo into model as OLE object?

pperri's picture
by Patrick Perrin posted on 2012-01-09

Hi Vladimir,

Thanks for your response.

Yes, I have inserted logo into models as OLE object.

Regards,

Patrick

VladoB's picture
by Vladimir Bis posted on 2012-01-12

Hi Patrick,

my example supposes a new company logo in model "Model1"

var g_nLoc = Context.getSelectedLanguage();    
var oModels = ArisData.getSelectedModels();

// get a new company logo from Model1            
for ( var m = 0 ; m < oModels.length; m++ ){
     if (oModels[m].Name(g_nLoc) == "Model1"){                                                       
         var curOleObj = oModels[m].ComObjOccs()[0];
         break;
     }
}

// copy a new company logo to other selected models      
for ( var m = 0 ; m < oModels.length; m++ ){                                                                         
     if (oModels[m].Name(g_nLoc) != "Model1") 
       oModels[m].ComObjOccs()[0].setCopyOf(curOleObj);       
}
pperri's picture
by Patrick Perrin posted on 2012-01-19

Hi Vladimir,

Thanks a lot for your support Vladimir!

Regards,

Patrick