Book a Demo

Author Topic: Default appearance script  (Read 4571 times)

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Default appearance script
« on: August 31, 2015, 06:43:07 pm »
Guys,

Last weeks I am full into scripting, so that's why I have all those questions ;)

Elements in the model which we created in the last period uses colors to show the status. As you know colors are not the best way to deal with information so this is why we want to convert the colors to tagged values.

Because there isn't a method getAppearance() in the element class I tried to get the colors (style) of all the diagramObjects belonging to the element. This worked but the result is that I only know the diagram appearance and not the 'default' appearance.

So my question is how I can get the default appearance of an element with a script.

kind regards,
Roy

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Default appearance script
« Reply #1 on: August 31, 2015, 08:14:29 pm »
Hello Roy,


To my knowledge there's no simple way to do this.

There's no API call to retrieve the default appearance; in general the metaclasses and their attributes are not accessible through EA's API.

So the question is: where are these settings stored? Are they in the project, or in the user's %APPDATA% folder, or in the registry? And I'm afraid my answer is "I don't know."

So if there are only a few dozen elements, you might be better off just doing it manually.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

royvanmarrewijk

  • EA User
  • **
  • Posts: 61
  • Karma: +1/-0
    • View Profile
Re: Default appearance script
« Reply #2 on: August 31, 2015, 09:07:33 pm »
Hi /Uffe,

Thanks for your replay! Saidly it isn't the answer I hoped it would be but at least now I know that I have to change my plans in stead of keep on trying to fix it.

Thanks again ;D

Roy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Default appearance script
« Reply #3 on: August 31, 2015, 09:53:05 pm »
Maybe you explain what you mean by "default appearance".

q.