1
Automation Interface, Add-Ins and Tools / Re: How can I set the Diagram Property "Group Tags by Stereotype" with my Addin?
« on: June 06, 2023, 09:37:07 pm »
Thanks Geert 
I found it in StyleEx

I found it in StyleEx
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Repository.EnableUIUpdates = false;
//Create Package
EA.Package newPackage = (EA.Package)collection.AddNew(name, "");
newPackage.Update();
newPackage.Element.Stereotype = Library.EA.Types.InformationType;
newPackage.Update();
foreach (EA.TaggedValue tag in newPackage.Element.TaggedValues)
{
foreach (EaProperty property in item.Properties)
{
if (tag.Name == property.Name)
{
tag.Value = property.Value;
tag.Update();
}
}
}
newPackage.Element.TaggedValues.Refresh();
//Create Element
EA.Element newElement = (EA.Element)collection.AddNew(item.Name, item.EaType);
collection.Refresh();
newElement.Update();
foreach (EA.TaggedValue tag in newElement.TaggedValues)
{
foreach (EaProperty property in item.Properties)
{
if (tag.Name == property.Name)
{
tag.Value = property.Value;
tag.Update();
}
}
}
newElement.TaggedValues.Refresh();