BH

My name is Ben Hardin and I am totally new to the ARIS  and using the ARIS APIs.  I am creating an excel document and I need to make the headers bold.  I am proving a snippet of code.  But near the  g_attrListToPrint var.  I have it set up in the form of an array. When I print out the excel sheet I will need all the headers bold.  Can some give me some insight on how to do that  I have tried some of the APIs and I have not had any success fulfilling what I am trying to do.  I have tried to use some javascript APIs outside of ARIS and as you all know they do not work.  Initially I tried to do this below by adding the FMT_BOLD at the end of the constant names.  But after executing the program I found out for that to be wrong. What do I need to do in order to change the Constant names that I am using that they can become bold? Again,  I am new to ARIS 9.8.  I have never used this before now.  So if what you see does not make sense please help me so it can make sense to me.

==================== MY INITIAL APPROACH =====================

Constants.AT_NAME. FMT_BOLD,                    (This is wrong)                                                             

Constants.AT_DESC. FMT_BOLD,                    (This is wrong) 

Constants.AT_REM. FMT_BOLD,                      (This is wrong) 

Constants.AT_LAST_CHNG_2. FMT_BOLD,    (This is wrong) 

=============================================================

var xlsBook;

var xlsFontHeader;

var xlsHeader;

var xlsFontStandard;

var xlsStandard;

var g_objTypeToFind = Constants.OT_APPL_SYS_TYPE; 

var g_cxnTypeToFind = Constants.CT_BELONGS_TO_CLS;

var g_cxnDirectionToFind = Constants.EDGES_IN;

var g_attrListToPrint =  [  Constants.AT_NAME,      // How can I make these constants bold                                              

                                        Constants.AT_DESC,       // How can I make these constants bold   

                                        Constants.AT_REM,        // How can I make these constants bold   

                                        Constants.AT_LAST_CHNG_2,  // How can I make these constants bold        

]

=============================================================

 

File attachments
by Kay Fischbach
Posted on Mon, 02/19/2018 - 08:58

Hello Mr Hardin and welcome to ARIS,

the constants that you want to make bolt should not be made bolt. These constants only allow the ARIS Script API to get an Attribute Type Number (an int value), so all you are writing for example would be 1, 9, 8, 1175.

The default javascript APIs outside of ARIS actually do work just fine, you would only need to define a new file for that and add the file to the list of files transferred from the server to the client. Then you could go completely without the ARIS Script way of doing things (which can be a bit restricting from time to time).

Let me give you a different direction. Have you tried using the ARIS Report What-you-see-is-what-you-get-editor (WYSIWYG)? This tool gives you the liberty of designing what your document should look like with a GUI, plus it auto generates a huge part of the evaluation logic. And no worries: If the WYSIWYG-editor does not fully cover all the evaluation techniques you need, you can later on go the one-way route of converting the GUI-editable report into a normal JavaScript/ArisScript report to in depth customize how the evaluation works. Use the WYSIWYG-editor as a skeleton creator and later on edit bits and pieces of the skeleton to make the report truly do what it's supposed to do.

Although it's a 2010 tutorial and a few things look different nowadays with newer ARIS versions, this tutorial got me started with ARIS Script only one year ago. It teaches you step by step how to do things, all the way from the WYSIWYG editor to manually changing your code.

0
by Benjamin Hardin Author
Posted on Mon, 02/19/2018 - 17:36

Kay,

Thanks for the response.  After reading your reply I am confined to the [Aris Architect] environment. I am working with ARIS 9.8.  For the work that I am doing I would not be permitted to use the WYSIWYG.  I believe this scope is outside of the realm of my project mission. In this environment,  I have not seen where outside javascript api's are being used.

0
by Martin Schröder
Badge for 'Contributor' achievement
Posted on Sun, 03/04/2018 - 14:25

Hello Benjamin,

IMHO you are giving up too early. Learning the ARIS script methods needs at least some reading and a minimum of patience to understand the concept.

If you followed the link to the ARIS scripting tutorials given by Kay Fischbach you could have found in this treasure box for starters:

Further source of inspiration are the default report scripts delivered with your installation. Any of them which output to Excel do the trick you are looking for. There is no need to try external javascript APIs.

Regards, Martin

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