Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ian Mitchell on December 10, 2020, 08:30:58 pm

Title: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 10, 2020, 08:30:58 pm
Does anyone now why the XMI Export API (ExportPackageXMIEx) doesn't export images for charts ?
It works fine for normal diagrams, but with charts I just get an empty box where the chart picture should be.
Is this the expected behaviour? Or a feature ?
(@Q - try to be nice, please)

V15.2, Ultimate.
Update - manual copy of diagram to a file works fine.
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Geert Bellekens on December 10, 2020, 08:40:00 pm
What parameter values did you use?

Specifically the parameter DiagramXML might be relevant.

Does it work when you do a manual xmi export?

Geert
Title: Re: ExportPackageXMIEx not exporting charts
Post by: qwerty on December 10, 2020, 08:41:30 pm
Hmm. Never used charts (one of those Sparx gimmicks...). Leaves me out of this in any case. Hope that will be nice enough.

q.
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 10, 2020, 08:47:47 pm

I'm using:
proj.ExportPackageXMIEx(p.guid, 0, 1, 1, 0, 0, folderString, 0)

...which works fine for everything else.
I tried the 'export diagrams with alternate image' but it made no difference.

A manual export also exports empty diagram images, so it looks like the API and the UI are both using the same code, which is good. It just doesn't work, which is less good.
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Geert Bellekens on December 10, 2020, 09:06:11 pm
I see. But it's going to be easier to get a GUI problem fixed then a pure API problem.

Unless this is because there is some obscure setting somewhere that controls this behavior ???

Geert
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 11, 2020, 08:16:41 pm
@Sparx - any comment on this?
Feature or bug ?
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 14, 2020, 10:48:31 pm
Hey @Sparx - I'm serious about this - is this a bug or a feature?
Title: Re: ExportPackageXMIEx not exporting charts
Post by: RoyC on December 15, 2020, 10:34:56 am
Personally, I couldn't tell you. If you send an email directly to Sparx Support, it will go into the official system and land on someone's desk with a meaty thump, and that person will be obliged to respond to you.
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Paolo F Cantoni on December 15, 2020, 11:17:11 am
Personally, I couldn't tell you. If you send an email directly to Sparx Support, it will go into the official system and land on someone's desk with a meaty thump, and that person will be obliged to respond to you.
Hi Ian,

KP has noted that not all the developers from the various teams in Sparx (in my case the Simulation team) monitor the forum.  So I made sure I posted an official request.  I did get a more formal response for more data (and a sample) but unfortunately, no analysis or potential fix yet.

Paolo
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 15, 2020, 07:58:54 pm
I was trying to find out if it's a feature, perhaps controlled by some setting somewhere, or not, in which case it's a bug, and I'll report it.

I don't want to report bugs which aren't bugs, as that just wastes people's time, but if that's now the process, then that's what I'll do.
Expect to get more bug reports in future, for things which may or may not be bugs. Seems an odd process to me.....

Title: Re: ExportPackageXMIEx not exporting charts
Post by: Geert Bellekens on December 15, 2020, 08:12:22 pm
I was trying to find out if it's a feature, perhaps controlled by some setting somewhere, or not, in which case it's a bug, and I'll report it.

I don't want to report bugs which aren't bugs, as that just wastes people's time, but if that's now the process, then that's what I'll do.
Expect to get more bug reports in future, for things which may or may not be bugs. Seems an odd process to me.....

To be honest, I thing that has always been the process.
The description of the Bugs and Issues board reads:
Quote
Discuss specific usage issues with other users. To report bugs and issues to Sparx Systems, please use the Report a Bug link provided.

I do agree however that the current bug reporting process can be improved (a lot). But we have discussed that at length amongst us users many times already.

If only Sparx would listen to us...  :-\

Geert
Title: Re: ExportPackageXMIEx not exporting charts
Post by: RoyC on December 16, 2020, 09:55:10 am
I will take a guess here and say that a diagram is a fixed display. It exists as it is, and would be captured in an export. A Chart is generated anew every time it is opened, so perhaps exists in an empty-frame state until it is opened and populated.

I'm sure you can send an email to Sparx Support to ask for an explanation of what is happening, without saying "This is a bug!" Based on that discussion you might decide that a feature request is appropriate, to get ExportPackageXMIEx to open and populate the chart before exporting it. I have no idea if that is at all possible, but the email conversation might inform you better.
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on December 16, 2020, 09:36:01 pm
@Roy - that sounds plausible, given the dynamic nature of the chart content. I guess that a copy/paste of the image IS doing an update of the picture, which is why that works.
Can you think of any way that I might discover, via the API, that a particular diagram has some of this dynamic content, and so will need to be exported manually ? Or do I just read each one, decide if it contains elements which are dynamic (via their element stereotype?) ? Seems a bit heavy
Title: Re: ExportPackageXMIEx not exporting charts
Post by: Ian Mitchell on January 08, 2021, 07:33:34 pm
Update from Sparx :
Our developers have confirmed that this is a bug and it is logged to be fixed. We cannot yet say when (in which build) the fix will be implemented.
The issue id is : 20126609

Unfortunately, currently there is no workaround for this behavior.