Book a Demo

Author Topic: Not able to Add ConnetorTags  (Read 2277 times)

nikunj-dhamecha

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Not able to Add ConnetorTags
« on: February 25, 2023, 12:09:16 am »
Hello Everyone,

I have been trying to add Tag values on the connector as shown below:
Code: [Select]
EA.Connector connector;
connector = target.Connectors.AddNew("","Dependency");
connector.ClientID = source.ElementID;
connector.SupplierID = target.ElementID;
connector.Update();
var tag = connector.TaggedValues.AddNew("Tag", "String");
tag.Value = "tagVal";
connector.Update();

Unfortunately, connector is being created but the tags are not generated on the connector! But if I compare this with EA.Element, then the tags being generated with the same approach!
I am using EA 16! I dont know what extra needs to be set here to add the tag value on the connectors! An input would be helpful! Thanks!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Not able to Add ConnetorTags
« Reply #1 on: February 25, 2023, 12:31:32 am »
you forgot tag.update

Geert

nikunj-dhamecha

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Not able to Add ConnetorTags
« Reply #2 on: February 27, 2023, 03:02:22 pm »
Thanks, it worked! :)