Author Topic: standard enumeration values in scripts  (Read 3155 times)

Andrew Warner

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
standard enumeration values in scripts
« on: February 22, 2010, 05:29:40 pm »
Hi all,
Is someone able to tell me whether or not it's possible to get the enumeration values like
Code: [Select]
ObjectType.otDiagramfrom within one of the supported scripting languages?

I've tried "Repository.ObjectType.otDiagram" and "EA.ObjectType.otDiagram" but they're undefined.

Cheers,
Andrew.
Regards,
Andrew Warner.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13065
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: standard enumeration values in scripts
« Reply #1 on: February 22, 2010, 06:26:30 pm »
Andrew,

I don't use scripting, but in my Visual Studio
EA.ObjectType.otDiagram is a valid enumeration.

Geert

Shawn Stepper

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: standard enumeration values in scripts
« Reply #2 on: February 24, 2010, 05:47:25 am »
I've had to manually define these in my JScript scripts. They don't seem to be defined anywere.

var otElement = 4;
var otPackage = 5;
var otDiagram = 8;

if (theElement.ObjectType == otElement) {
...
}

where theElement is a handle on an element. You can get the integer values from the list in the Help. The list in the help is in order, and is 0 based.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: standard enumeration values in scripts
« Reply #3 on: February 24, 2010, 08:30:09 am »
Hi Shawn,

They're currently not supported at the moment, but we are working on it (you'll notice that we've defined them as globals in our sample scripts as well). I'd suggest for the meantime that you send in an official bug report so we can get an idea about how you're affected by the problem.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

Shawn Stepper

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: standard enumeration values in scripts
« Reply #4 on: February 25, 2010, 08:11:29 am »
It's not a big deal to me, once I figured out how to set the appropriate integer values.