Basicly i'm trying to layout a Diagram
in Enterprise Architect
with newly added DiagramObjects
via Add-In
.
I found that i should use the LayoutDiagramEx
method.
Next step is usage. Here's some code i'm trying to make work:
Repository.GetProjectInterface().LayoutDiagramEx(diagram.DiagramGUID, EA.ConstLayoutStyles.lsCycleRemoveDFS, 4, 20, 20, false);
Visual Studio hints that there is an error:
Interop type 'EA.ConstLayoutStyles' cannot be embedded. Use the applicable interface instead.
I cannot find the problem here sadly.
Does anyone know how to use the ConstLayoutStyles?
Thanks for the tips or the answer in advance!
Tamas
Hi Instead Try the values directly from below.
Repository.GetProjectInterface().LayoutDiagramEx(treeSelectedObject.DiagramGUID, 0x40000000, 4, 20, 20, false);
In most cases only the default layout will be assigned.
where LayoutStyle is one of the Enum values from below
You can find the constant values in EA. Scripts -> Local Scripts -> EAConstants-JScript\EAConstants-VBScript
HTH
Arshad