Author Topic: How to hide a boundary rectangle in a diagram  (Read 6893 times)

Hermes

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
How to hide a boundary rectangle in a diagram
« on: December 01, 2009, 03:20:57 am »
Dear EA community,

is possible to hide all/some boundary rectangles when exporting diagram images (jpg/bmp/emf)?

Thank you.  :)

/Hermes
« Last Edit: December 01, 2009, 04:09:53 am by hermes »

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #1 on: December 01, 2009, 10:17:22 am »
I'm not quite sure what you mean by boundary rectangles, so taking a shot that you mean diagram frames.

From the menu choose Tools-->Options--Diagram . In the lower right there are options for turning off the display of diagram frames.

Stan.

Hermes

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #2 on: December 01, 2009, 10:07:02 pm »
Dear smendonc,
thank you :)

Well, I really mean boundary rectangles,
even if your doubts are well founded:
those boudaries rectangles are stereotyped to provide a similar notation of diagram frames, but instead of diagram frames (that should be used only in behavioural diagrams) my stereotyped boundaries can be applied to any diagram type.

In a first moment I've tried to stereotype a diagram frame, but I've encountered a problem: EA crashes when I tried to add a connector to stereotyped diagram frames.
I don't know if this is a EA bug or simply a EA limit.
But this happens only for stereotyped diagram frames.
So, to underline the difference beetwen "normal" diagram frames and "my" diagram frame, I decided to use a stereotyped boundary rectangle.


NOTE: I need to hide this rectangles only when my Addin runs a special function to generate reports.

Any ideas?

Thank you.
/H
« Last Edit: December 01, 2009, 10:07:54 pm by hermes »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #3 on: December 02, 2009, 08:42:37 am »
You can define a stereotype «invisible» that applies the following shape script:

Code: [Select]
shape main
{
}
If you set the stereotype's base class to '<all>' you can apply it to any element.

Regarding EA crashing, this needs investigating so please send in a bug report. Thanks.
The Sparx Team
[email protected]

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #4 on: December 03, 2009, 09:26:54 pm »
Yes,

But was not the question if it possible to hide symbols when exporting them? At least I want to show them on screen but when exporting removing certain elements.

// Magnus

Hermes

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #5 on: December 04, 2009, 03:06:40 am »
Dear KP,

thank you for you answer...

I have tried you hint but it not worked for me:

I've tried to create a stereotype ghost extending a boundary... and than adding your shape script as described in
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/add_shape_scripts_to_uml_profi.html.

Do I have made some mistake somewhere?

@MagnusH: yes that is exactly what I need. :)

PS: About the EA bug... i opened a thread in the dedicated section of this forum.

Thanks again.

/H
« Last Edit: December 04, 2009, 07:07:51 am by hermes »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #6 on: December 04, 2009, 08:34:01 am »
Quote
Yes,

But was not the question if it possible to hide symbols when exporting them? At least I want to show them on screen but when exporting removing certain elements.

// Magnus
Select the elements you want to appear in your diagram (hold down Ctrl and click the ones to select) then press Ctrl+C to copy the selected elements to the clipboard. Open a graphics application (MS Paint will do) and paste the clipboard into a new diagram. HTH
The Sparx Team
[email protected]

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #7 on: December 04, 2009, 06:02:58 pm »
Quote
Quote
Yes,

But was not the question if it possible to hide symbols when exporting them? At least I want to show them on screen but when exporting removing certain elements.

// Magnus
Select the elements you want to appear in your diagram (hold down Ctrl and click the ones to select) then press Ctrl+C to copy the selected elements to the clipboard. Open a graphics application (MS Paint will do) and paste the clipboard into a new diagram. HTH

With respect to the forum category, how to do this with the current object model? I can select the elements that I want but how to put them on the clipboard, or in a file, I cannot find?

// Magnus


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to hide a boundary rectangle in a diagram
« Reply #8 on: December 04, 2009, 06:08:47 pm »
Through the API you can only get the image for a whole diagram, not for parts AFAIK.

Geert

Hermes

  • EA User
  • **
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #9 on: December 07, 2009, 09:28:20 pm »
ok  :'(

beginner

  • Guest
Re: How to hide a boundary rectangle in a diagram
« Reply #10 on: December 07, 2009, 09:51:35 pm »
I guess you could hide elements via the API, clip/save and show them back again.

b.

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #11 on: December 07, 2009, 10:00:00 pm »
Quote
I guess you could hide elements via the API, clip/save and show them back again.

b.
Could be one approach but I cannot find any method to do that. Any hint where to look for? (I have found how to hide connectors but not elements in a diagram)

// Magnus

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to hide a boundary rectangle in a diagram
« Reply #12 on: December 07, 2009, 10:15:22 pm »
Quote
Could be one approach but I cannot find any method to do that. Any hint where to look for? (I have found how to hide connectors but not elements in a diagram)

// Magnus
That's because you can't hide elements in an EA diagram, you can only remove them...

There's confusion within EA regarding:
Hiding vs Removal vs Deletion vs Purging of Vertexes (shapes) versus Arcs (lines)

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!