Reputation: 287
I am trying to create an EA Attribute and after that I am adding Tagged Value to that attribute.
The problem is when I create the tagged value for the attribute without any value then its creating fine with proper Type but when I fill some value into the tagged then the Type of the tagged value is changing.
EA.Attribute headerName = eleName.Attributes.AddNew("Header", "char");
headerName.Update();
EA.AttributeTag decAtt = headerName.TaggedValues.AddNew("Description", "<memo>");
decAtt.Update();
decAtt.Value = "Description needs to entered";
How to add the Tagged values for the attribute without changing the properties ?
How to add the contents to Tagged values note through Adddin ?
Thanks in advance.
Upvotes: 0
Views: 280
Reputation: 13711
Try this:
EA.Attribute headerName = eleName.Attributes.AddNew("Header", "char");
headerName.Update();
EA.AttributeTag decAtt = headerName.TaggedValues.AddNew("Description","");
decAtt.Value = "<memo>";
decAtt.Notes = "Description needs to be entered";
decAtt.Update();
PS. I'm surprised the Attributes.AddNew("Header", "char")
works for you. I would never trust the AddNew operation to define the type of my attributes.
Upvotes: 2