Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mark.myers on August 30, 2007, 02:55:08 pm

Title: PutDiagramImageOnClipboard
Post by: mark.myers on August 30, 2007, 02:55:08 pm
Has anyone used the PutDiagramImageOnClipboard method of the Project interface? It works well but EA opens (and makes active) the diagram you are saving the image for - is there anyway to stop that, ie save an image of a diagram without having it open in the UI? I tried Repository.EnableUIUpdates
=false but that didn't seem to make any difference.
Title: Re: PutDiagramImageOnClipboard
Post by: «Midnight» on August 31, 2007, 04:34:44 am
That sounds like a bug to me Mark.

Please report that directly to Sparx, in the hope for a quick fix. You might be in time for build 817.

David
Title: Re: PutDiagramImageOnClipboard
Post by: thomaskilian on August 31, 2007, 05:54:19 am
Not necessarily. Depends on the definition of EnableUIUpdates:
Quote
Read/Write. Set this property to false to improve the performance of changes to the model, eg. Bulk addition of elements to a package. To reveal the changes to the user, call Repository.RefreshModelView().

So it does not necessarily suppress output. It ONLY optimizes something.
Title: Re: PutDiagramImageOnClipboard
Post by: «Midnight» on August 31, 2007, 10:50:54 am
Quote
Not necessarily. Depends on the definition of EnableUIUpdates:
So it does not necessarily suppress output. It ONLY optimizes something.

But something that did suppress output might be welcome, particularly in the situation Mark envisions.

David

PS: Mark, perhaps a suggestion instead of a bug report then. You know the best practice drill...
Title: Re: PutDiagramImageOnClipboard
Post by: mark.myers on August 31, 2007, 02:55:45 pm
David,

I submitted it as a bug report with a link to this topic so th e Sparxians can decide if it is a bug or feature request. However, I agree with you that if this is not the intended behaviour of EnableUIUpdates then something else is required.

Mark

On further thought...I wonder if this is because EnableUIUpdates is a property of Repository and I am using the Project interface (which has the method I need) - a subtle difference between Project and Repository perhaps!
Title: Re: PutDiagramImageOnClipboard
Post by: «Midnight» on September 01, 2007, 10:30:52 am
Quote
I wonder if this is because EnableUIUpdates is a property of Repository and I am using the Project interface (which has the method I need) - a subtle difference between Project and Repository perhaps!

I think your original complain holds true either way. Even if this is meant to be a 'repository-only' function, it should not be fiddling with the open project.

So go with your first thought...

David
Title: Re: PutDiagramImageOnClipboard
Post by: mark.myers on September 02, 2007, 02:28:13 pm
Quote
I think your original complain holds true either way. Even if this is meant to be a 'repository-only' function, it should not be fiddling with the open project.

David


Precisely, David.
My after-thought was in no way meant to negate my previous comments but just conjecture that may, or may not, assist Sparx in identifying where the problem lays.

Mark.
Title: Re: PutDiagramImageOnClipboard
Post by: «Midnight» on September 03, 2007, 04:44:13 am
Quote

Precisely, David.
My after-thought was in no way meant to negate my previous comments but just conjecture that may, or may not, assist Sparx in identifying where the problem lays.

Mark.

I'm with you on that Mark!