Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Vv on January 16, 2009, 02:02:22 am
-
I try to export a Diagram from EA to a bmp file.
I do like this:
Repository r = new org.sparx.Repository();
r.OpenFile("D:/Projets/toto/ea/ProjetToto/toto.eap");
Project project = r.GetProjectInterface();
String str = "{17F0F0FF-4F26-4b6d-8FC7-7456AACD7BF1}"
String image = project.ExportPackageXMI(str, EnumXMIType.xmiEADefault, 1, 1, 1, 1,"myPicture");
System.out.println("Ecriture de l'image :"+image);
I can't find any picture and variable 'image' is empty.
Could you help me?
-
Try replacing "myPicture" with a full path. But remember that this function is saving an XML file, so something along the lines of "C:\Images\Package.xml". You probably have a file "myPicture" in the directory EA was started from with bitmaps sitting next to it.
The return value gives an error string, so at least I can say that the package does exist.
-
is it possible to export just one diagram in a bmp, jpg file?
-
Project.PutDiagramImageToFile (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/project_2.html)
-
OK it's working. Thanks for all