Book a Demo

Author Topic: Connector TaggedValues Collection  (Read 4340 times)

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Connector TaggedValues Collection
« on: August 06, 2006, 05:18:10 pm »
Hello All,

It seems that, while casting Element.TaggedValues.GetAt(x) to TaggedValue works fine, trying the same with Connector.TaggedValues throws a COM invalid cast exception. In addition, Connector.TaggedValues.GetByName(name) always seems to throw an OLE exception, yet GetByName() works fine for an Element.

Cheers,
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Connector TaggedValues Collection
« Reply #1 on: August 06, 2006, 05:38:24 pm »
Quote
It seems that, while casting Element.TaggedValues.GetAt(x) to TaggedValue works fine, trying the same with Connector.TaggedValues throws a COM invalid cast exception.

A connector's tagged values are of type EA.ConnectorTag.

Quote
In addition, Connector.TaggedValues.GetByName(name) always seems to throw an OLE exception, yet GetByName() works fine for an Element.

Don't know why that is, but looping through collection until you make a match works...
The Sparx Team
[email protected]

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Connector TaggedValues Collection
« Reply #2 on: August 07, 2006, 06:26:58 pm »
Thanks...tried it and it works OK!

Still, the perfectionist in me says the glitch with GetByName() should be fixed. Also, the Automation Interface documentation could use an editorial review for completeness?

EA is a fantastic product...it would be a shame if someone were to be put off by a minor glitch like the one discussed.

Cheers,
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


thomaskilian

  • Guest
Re: Connector TaggedValues Collection
« Reply #3 on: August 08, 2006, 01:16:15 am »
As a work around I normally extend my access class by a GetByName operation which preforms the loop internally. Funny though that EA offers a GetByName which simply does not work (applies also for various other classes!). I'd rather expect it to either work or not exist.