JJ

Hi everybody,

I'am new to ARIS.

I would try export each models ARIS into one document Excel.

I don't found in ARIS Business Architect 7.1. I have found an old external VB Script for this.

I have an error on this script at this line :

Set ats = CreateObject("ARIS.Application.7.1")                 

Set report = ats.GetComponent("Report")      

Error :

Erreur d'exécution Microsoft VBScript: Cet objet ne gère pas cette propriété ou cette méthode: 'ats.GetComponent'

I don't understand !

Do you have an another solution for this export  problem ?

 

Thanks

by Julien Job Author
Posted on Wed, 10/19/2011 - 12:04

Edit :

Good Error is :

Erreur d'exécution Microsoft VBScript: Un composant ActiveX ne peut pas créer un objet.: 'ARIS.Application.7.1'

0
by Julien Job Author
Posted on Wed, 10/19/2011 - 15:44

My script :

var workbook;
var sheet;
var g_nLoc = Context.getSelectedLanguage();
var models = ArisData.getSelectedModels();
//guid =  ArisData.getActiveDatabase().getSelectedModels());
var dummyOutput = Context.createOutputObject();
var guid = "_Blank";

main();

dummyOutput.WriteReport() //otherwise it would overwrite the excel output!


function main(){
    for(var i=0;i<models.length;i++){
        var oModel = models[i];
       guid = oModel.GUID();
        
        //Creation fichier Excel
        workbook = Context.createExcelWorkbook("m" + guid + "_gfx.xls");
        
        sheet = workbook.createSheet(oModel.Name(g_nLoc));    
        pictureOfModel(oModel,sheet);
        
        workbook.write();
    }
}

function pictureOfModel(oModel, sheet) {
    var pic = oModel.Graphic(false,false,g_nLoc);
    var sfileName = oModel.GUID() + ".png";
    var width = pic.getWidth(Constants.SIZE_PIXEL ) * 20 * (100.0/125.0) //twips, correction factor because of excel anomaly (X): * (100.0/125.0)
    var xCells = width / 1024;
    var xTwips = width % 1024;
    var height = pic.getHeight(Constants.SIZE_PIXEL ) * 20*(100.0/133.0) //twips, correction factor because of excel anomaly (Y): \*(100.0/133.0)*/
    var yCells = height / 256;
    var yTwips = height % 256;
    pic.setZoom(150) // image improvement only(optional)
    pic.Save(dummyOutput, sfileName);
    var data = Context.getFile(sfileName, Constants.LOCATION_OUTPUT);

    sheet.setPicture ( data, 0, 4, 0+xCells, 4+yCells, 0, 0, xTwips, yTwips);
    Context.deleteFile(sfileName);
0

Featured achievement

Genius
You like to help others solve their problems by answering questions.
Recent Unlocks
  • KF
  • KH
  • RG
  • Profile picture for user Vee_ARIS
  • Profile picture for user smarty
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock