RS

Great Day :-)

by using begin table method how to export model into image.not by using worksheet.please share some code snippet, it will be great helpfull for me.

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Thu, 07/02/2015 - 08:39

Well, if you do not want to use the worksheet functionality, you just create a standard picture.

oOutFile.TableRow();

oOutFile.TableCellF("", 1, 1, sStyle); 

 

oPicture = oModel.Graphic(false, false, g_nLoc);

oOutFile.OutGraphic(oPicture, lZoomFactor, g_oOutFile.getCurrentMaxWidth(), g_oOutFile.GetPageHeight() - oOutFile.GetTopMargin() - g_oOutFile.GetBottomMargin() - lReduceHeight)

 

0
by Rajesh Selvaraj Author
Posted on Thu, 07/02/2015 - 09:44

In reply to by rgoldenbaum

Hi Robert,

Thnx for your prompt response .

i used the below code for your referance still facing issue, empty sheet 

var g_nLoc = Context.getSelectedLanguage();
var File = Context.createOutputObject();
 File.BeginTable(100,Constants.C_BLACK,Constants.C_WHITE,Constants.FMT_LEFT | Constants.FMT_ITALIC,0); 
 File.TableRow();
 File.TableCellF("", 1, 1, "sStyle"); 
 var oModel = ArisData.getSelectedModels()[0];
oPicture = oModel.Graphic(false, false, g_nLoc);
File.OutGraphic(oPicture, 100, File.getCurrentMaxWidth(), File.GetPageHeight() - File.GetTopMargin() - File.GetBottomMargin() - 15)

 

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Thu, 07/02/2015 - 10:34

Hi Rajesh,

well, you have to end the table as well and write the output at the end.

0
by Marcus Chan
Posted on Wed, 10/31/2018 - 13:05

Hi

I'm trying to do the same as the above but the graphic is not being exported as expected. Does someone have any tips?

Thanks

Marcus

 

Code:

var g_nLoc = Context.getSelectedLanguage();

xlsOutObj = Context.createOutputObject(Constants.OutputXLS, "excel.xls");

xlsOutObj.DefineF("Section", "Arial", 12, Constants.C_BLACK, Constants.C_LIGHT_TURQUOISE,  Constants.FMT_BOLD|Constants.FMT_JUSTIFY|Constants.FMT_VTOP|Constants.FMT_EXCELMODIFY, 1, 0, 0, 0, 0, 0);

xlsOutObj.DefineF("Title", "Arial", 9, Constants.C_BLACK, Constants.C_LIGHT_BLUE,  Constants.FMT_BOLD|Constants.FMT_LEFT|Constants.FMT_VTOP|Constants.FMT_EXCELMODIFY, 1, 0, 0, 0, 0, 0);

xlsOutObj.DefineF("Text", "Arial", 9, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT|Constants.FMT_VTOP|Constants.FMT_EXCELMODIFY, 1, 0, 0, 0, 0, 0);

xlsOutObj.BeginTable(100, Constants.C_BLACK, Constants.C_WHITE, Constants.FMT_LEFT | Constants.FMT_ITALIC,0);

    for(j = 0; j < objArray.length; j++){

        xlsOutObj.TableRow();

        xlsOutObj.TableCellF(objArray[j].Name(-1), 100, "Section");

        xlsOutObj.TableRow();

        xlsOutObj.TableCellF(" ", 100, "Text");

        xlsOutObj.TableRow();

        var modelArray = objArray[j].AssignedModels(new Array(Constants.MT_BPMN_ALLOC_DIAGR, Constants.MT_BPMN_ALLOCATION_DIAGRAM, Constants.MT_BPMN_COLLABORATION_DIAGRAM, Constants.MT_BPMN_CONVERSATION_DIAGRAM, Constants.MT_BPD_BPMN, Constants.MT_BPMN_PROCESS_DIAGRAM, Constants.MT_ENTERPRISE_BPMN_COLLABORATION, Constants.MT_ENTERPRISE_BPMN_PROCESS, Constants.MT_FUNC_ALLOC_DGM, Constants.MT_VAL_ADD_CHN_DGM));

        for(m = 0; m < modelArray.length; m++){

            xlsOutObj.TableCellF(modelArray[m].Attribute(Constants.AT_NAME, g_nLoc).GetValue(false), 100, "Title");

            xlsOutObj.TableRow();

            xlsOutObj.TableCellF(" ", 100, "Text");

            xlsOutObj.TableRow();

            xlsOutObj.TableCellF("===================================================================", 100, "Text");

            xlsOutObj.TableRow();

            var iModel = modelArray[m].Graphic(false, false, g_nLoc)

            xlsOutObj.OutGraphic(iModel, 100, xlsOutObj.getCurrentMaxWidth(), (xlsOutObj.GetPageHeight() - xlsOutObj.GetTopMargin() - xlsOutObj.GetBottomMargin() - 20));

            xlsOutObj.TableRow();

            xlsOutObj.TableCellF("===================================================================", 100, "Text");

            xlsOutObj.TableRow();

        }

    }

xlsOutObj.EndTable(tableName, 100, "Arial",10, Constants.C_BLACK, Constants.C_BLACK,0, Constants.FMT_LEFT | Constants.FMT_ITALIC,0);

xlsOutObj.WriteReport();

Context.addOutputFileName("excel.xls");

 

Result:

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

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