Book a Demo

Author Topic: Reading a Package's Tagged Values  (Read 3587 times)

Chris Allport

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Reading a Package's Tagged Values
« on: April 23, 2013, 05:38:11 am »
My model has a package with tagged values, but the automation interface does not have a "GetTaggedValues" method for the package object.

Is it at all possible to access the tagged value data in the package?

Thanks,

Chris

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reading a Package's Tagged Values
« Reply #1 on: April 23, 2013, 05:52:14 am »
You need to refer to the package's Element object.

q.

Chris Allport

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Reading a Package's Tagged Values
« Reply #2 on: April 23, 2013, 07:07:46 am »
Thank you.  This worked.

For others:

Element e = pkg.GetElement();
Collection<TaggedValue> taggedValues = e.GetTaggedValues();  // They're in here!

b1256

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Reading a Package's Tagged Values
« Reply #3 on: May 03, 2013, 09:38:45 pm »
At least in code template there is IMHO a bug:

%packageTag:"xyz"% is not returning the tagged value xyz of the package the element is inside or something with inheritance logic, it is returning the tagged value xyz of the root package.