DS

Hi, I am trying to change font size of an object attribute within the model, but whenever I do so, the font size is changed of all object attributes I have in the model. Here is what I do:

model.TextOccList()[0].AttrOcc(1).SetPortOptions(Constants.ATTROCC_PORT_FREE, 4) 
FF = model.TextOccList()[0].AttrOcc(1).FontStyleSheet() 
FF.Font(1049).setSize(16) 
model.TextOccList()[0].AttrOcc(1).setFontStyleSheet(FF) 



so, the above code works, but it changes the font size of all attributes, so I thought I would try to overwrite the font size of the specific attributes that need to have different font. So, later in the code I put this, but it doesn't have any effect at all.

 

kpiArray[r].AttrOcc(9).SetPortOptions(Constants.ATTROCC_CENTER, 4) 
kpiArray[r].AttrOcc(9).setAlignment(Constants.ATTROCC_ALIGN_LEFT) 
FF2 = kpiArray[r].AttrOcc(9).FontStyleSheet() 
FF2.Font(1049).setSize(10) 
model.TextOccList()[0].AttrOcc(1).setFontStyleSheet(FF2) 



Has anyone do anything similiar to this before? Please share ideas...

by Amol Patil
Posted on Tue, 05/22/2012 - 09:14

Hi Di,

The fontstylesheets are maintained at database level, so by default the default font style is applied to all attributes. So if you collect the fontstyle in variable from an attribute and modify it, it will be modified for all the attributes using it.

You need to create a new fontstylesheet and apply it to the attribute occurrences.Check the method Database.createFontStyle()

Regards,

Amol Patil

 

0
by Gilad Wilk
Posted on Tue, 05/22/2012 - 09:41

Hi,

I wrote a report that creates a new model,

Now I want to add to this model a new header fragment, the fragment will consist the model name and another attribute.

I managed to create a text object with this information but it's not an attribute Occurence - the implications  is that when the name of the model changes from the original name the text in the header fragment remain the same.

So is it possible to create attr occ in a model?

 

Thank you very much in advance

Gilad

0
by Amol Patil
Posted on Wed, 05/23/2012 - 17:07

Hi Gilad,

Please look at the method

Model.CreateTextOcc ( int X, int Y, int p_nAttrTypeNum )

Regards,

Amol Patil

0
by Gilad Wilk
Posted on Thu, 05/24/2012 - 12:13

Hello Amol,

Thank you very much for the quick answer,

I tried using that before but this function creates a Text Occurence, the problem occures when you change the attribute value (F8 for the model) and the Text Occurence will not update accordingly.

Gilad

0
by Arun M
Posted on Tue, 06/18/2013 - 12:22

Hello Amol ,

i tried with this below code for make the font size , but i cant able to change the size of the font  and font   .Can you please tell me how to make a header font size only .?

 model.TextOccList()[0].AttrOcc(1).SetPortOptions(Constants.ATTROCC_PORT_FREE, 4);

 model.TextOccList()[0].AttrOcc(1).FontStyleSheet();

 FF.Font(1049).setSize(40);

  model.TextOccList()[0].AttrOcc(1).setFontStyleSheet(FF);

Thank you so much in advance .

 



  

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