I am using the following code to generate a diagram in Enterprise-Architect (Add-In with C#):
using EA;
...
public int AddDiagram(string name)
{
Package treeSelectedPackage = repository.GetTreeSelectedPackage();
Diagram dgr = treeSelectedPackage.Diagrams.AddNew(name, "Extended::Requirements");
dgr.Update();
treeSelectedPackage.Diagrams.Refresh();
treeSelectedPackage.Update();
return dgr.DiagramID;
}
repository is an EA.Repository
-Object.
I am able to add elements to the diagram, but I need to turn on the display of tags/tagged values in the diagram. In Enterprise-Architect you enable it by:
right click in diagram -> Properties... -> Tab 'Elements' -> Show Compartments: Check 'Tags'
What do I have to add to the method above to enable this for a new diagram?