Author Topic: PutDiagramImageOnClipboard  (Read 3869 times)

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
PutDiagramImageOnClipboard
« 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.
Cheers, Mark

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #1 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
No, you can't have it!

thomaskilian

  • Guest
Re: PutDiagramImageOnClipboard
« Reply #2 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.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #3 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...
No, you can't have it!

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #4 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!
« Last Edit: August 31, 2007, 03:30:38 pm by mark.myers »
Cheers, Mark

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #5 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
No, you can't have it!

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #6 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.
Cheers, Mark

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: PutDiagramImageOnClipboard
« Reply #7 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!
No, you can't have it!