Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: fanny983 on July 22, 2008, 02:07:06 am

Title: Problems with LayoutDiagramEx
Post by: fanny983 on July 22, 2008, 02:07:06 am
ConstLayoutStyles


Hi everybody,
I have some problems using LayoutDiagramEx instruction.
This is the code:


String b = rep.GetProjectInterface().GUIDtoXML(rep.GetProjectGUID());

Boolean c = rep.GetProjectInterface().LayoutDiagramEx(b, 2, 4, 20, 20, false);

I think that the problem is the parameters of LayoutDiagramEx, in particular LayoutStyle.

I would like to create a simple hierarchial format.

Bye
Title: Re: Problems with LayoutDiagramEx
Post by: RealAlex on July 22, 2008, 04:29:13 pm
I use something like
Code: [Select]
EARepos.GetProjectInterface.LayoutDiagramEx(diagCrear.DiagramGUID, ConstLayoutStyles.lsDiagramDefault, 4, 20, 20, False)
and it works,  but only if you already have that diagram locked. During my tests, I've found that it isn't necessary to do the GUIDtoXML part of the code, so give it a try with a diagram...