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
I have found this :
http://www.ariscommunity.com/users/eva-klein/2010-08-24-output-picture-model-microsoft-excel
Now, i must found how automatised for all models.
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);