Home » Eclipse Projects » Sirius » How to export specified diagram programmatically
| |
Re: How to export specified diagram programmatically [message #1692338 is a reply to message #1692079] |
Wed, 15 April 2015 07:31 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Hi,
As indicated in [1], to export a specific representation, a diagram for
example, you can use following API :
DialectUIManager.INSTANCE.export(representation, session,
absoluteImagePath, new ExportFormat(ExportDocumentFormat.NONE,
ImageFileFormat.PNG), new NullProgressMonitor());
Best Regards.
[1] https://www.eclipse.org/forums/index.php/t/813864/
Le 13/04/2015 11:30, Xue Liu a écrit :
> Hello everyone,
>
> I have learned how to export a diagram programmatically from
> https://www.eclipse.org/forums/index.php/t/813864/. Now I have a further
> question that how to export a specified diagram programmatically. for
> example in a case that I have several EMF model instances in a Model
> Project. Each instance has a responding diagram. And I want to generate
> the diagram responding the selected instance.
>
> Regards,
>
> Xue Liu
--
Esteban Dugueperoux - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
| |
Re: How to export specified diagram programmatically [message #1694985 is a reply to message #1694214] |
Mon, 11 May 2015 08:24 |
|
Le 02/05/2015 11:48, Xue Liu a écrit :
> Hi,
>
Hi,
> Thank you for your reply. Actually I know using
> DialectUIManager.INSTANCE.export(representation, session,
> absoluteImagePath, new ExportFormat(ExportDocumentFormat.NONE,
> ImageFileFormat.PNG), new NullProgressMonitor());
>
> The problem is how to specify the "representation" relating to the
> instance you choose.
>
> Any new ideas ?
I think that
DialectManager.INSTANCE.getRepresentations(EObject semantic, Session
session)
is whath you need.
>
> Regards,
>
> Xue Liu
Regards,
Laurent
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Goto Forum:
Current Time: Tue Apr 23 06:19:41 GMT 2024
Powered by FUDForum. Page generated in 0.03223 seconds
|