Book a Demo

Author Topic: Create shape scripts from EA scripting?  (Read 6125 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Create shape scripts from EA scripting?
« on: September 16, 2014, 06:38:59 am »
Hey all

I am probably being extraordinarily hopeful, but I am hoping to set the shape script of a new object as I create it from my repository script.

So:

1. Make a call to the repository to create the object based on some predefined stereotype.
2. Change the contents on the shape script based on some criteria.

Cheers

Jays :-)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Create shape scripts from EA scripting?
« Reply #1 on: September 16, 2014, 07:19:21 am »
Well in theory ( I haven't tried it) you just need to create an attribute on the class named "_image" with a default value something like this
Image type=""EAShapeScript 1.0"" xmlns:dt=""urn:schemas-microsoft-com:datatypes"" dt:dt=""bin.base64"">UEsDB......
Where the coded string at the end is shapescript base 64 encoded and if memory serves me right I think it might be zipped too.

Kind of interested in the application of this. Would you care to share?
« Last Edit: September 16, 2014, 07:22:00 am by phenzell »
Happy to help
:)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Create shape scripts from EA scripting?
« Reply #2 on: September 16, 2014, 07:27:18 am »
Looking to create things similar to "heat maps" where the user can select a value from a tagged value and the element changes colour accordingly.

Of course, there are a LOT of applications for this sort of thing and the set of possible values might change. For example:

* High, Medium, Low.
* Must Have, Should Have ,Could Have.

So, I was trying to avoid creating a different stereotype for each, which needs to be recompiled into an MDG (cos this is beyong my users).

Instead I was planning to allow users to configure these using elements and then create the different elements using repository scripting.

Cheers

Jays :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Create shape scripts from EA scripting?
« Reply #3 on: September 16, 2014, 07:44:21 am »
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1330884294/7#7

Though I would be very suspicious whether such a hack would actually fly. I guess EA will do some additional voodoo with the script. At least (I guess) it will only load it when the MDG is loaded (which is when you enable it or EA starts). Probably the standard stereos will likely also be evaluated only once.

Good luck!

q.
« Last Edit: September 16, 2014, 07:47:10 am by qwerty »

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Create shape scripts from EA scripting?
« Reply #4 on: September 16, 2014, 12:20:54 pm »
Quote
Looking to create things similar to "heat maps" where the user can select a value from a tagged value and the element changes colour accordingly.

Of course, there are a LOT of applications for this sort of thing and the set of possible values might change. For example:

* High, Medium, Low.
* Must Have, Should Have ,Could Have.

So, I was trying to avoid creating a different stereotype for each, which needs to be recompiled into an MDG (cos this is beyong my users).

Instead I was planning to allow users to configure these using elements and then create the different elements using repository scripting.

Cheers

Jays :-)

Have we got a EA script for you for heat maps. Will contact you direct Jayson.

Sorry guys out there this is for use with NZ Govt only.
Happy to help
:)