Author Topic: Adding TaggedValues to a Connector  (Read 3992 times)

klatchy

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Adding TaggedValues to a Connector
« on: May 30, 2004, 10:14:39 pm »
Has anyone else encountered a InvalidCastException when trying to add tagged values to a connector?

Connector myConnector = supplierElement.Connectors.AddNew("Depends on", "Dependency");

TaggedValue t = (TaggedValue)myConnector.TaggedValues.AddNew("A-Tag", "");

C# complains that I have invalidly cast to a TaggedValue, but I am doing this for adding TaggedValues to all my elements. Maybe this isn't implemented for Connectors?

Can someone else confirm this?

Thanks,

Ian

[edit] Note to self, RTFM, Connector.TaggedValues.AddNew() returns a ConnectorTag *slap* [/edit]

 
« Last Edit: May 31, 2004, 02:15:05 pm by klatchy »

schaveyt

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I Luv .NET
    • View Profile
Re: Adding TaggedValues to a Connector
« Reply #1 on: August 07, 2004, 08:22:37 am »
It looks like you may have solved you own problem. As you 'note-to-self' says, you need to you the ConntectorTag class rather than the TaggedValue class. This little nuance really throw me for a loop for about an hour...'til I saw you little note.