Author Topic: Hide Diagram Note Element  (Read 9824 times)

Ricardo Momm

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Hide Diagram Note Element
« on: January 26, 2011, 06:56:32 am »
Hi,

I have one add-in using C# to generate my Technical Specification in word format and all of my sequence diagram has a lot of notes. My add-in get those notes and print then after the diagram in a table for reference. I had to hide the note element from diagram because in the diagram it has no readability and now it is ambiguous.

Sorry about my english level but I really need help with that.

Is there any option to hide this element?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hide Diagram Note Element
« Reply #1 on: January 26, 2011, 06:11:25 pm »
Ricardo,

There is no way of hiding a note element while still having it on the diagram.
You can remove the note from a diagram, and it will still exists (if shown on other diagrams), but I don't think there is a way of "hiding" it without removing it from the diagram.

You could of course play dirty and assign an alternatate image to the note element.

I just did a little test, created a bmp image with a single black pixel, and if you assign that as an alternate image to the note it almost dissapears, effectively hiding the note element while it is still on the diagram.

Geert

Ricardo Momm

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Hide Diagram Note Element
« Reply #2 on: January 26, 2011, 10:21:30 pm »
Hmm... nice, if i assign an pixel image to the note and set the connector color to the diagram background  solves my problem.

How can I change the Note image in C#? I didn´t find any property or method to do that.

Thanks for the tip Geert.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hide Diagram Note Element
« Reply #3 on: January 26, 2011, 11:22:31 pm »
I have no idea.
I know the alternate image is stored in t_image but I haven't found the relation between the diagramobject and the alternate image.

Have you tried to search the forum for "alternate image"?

Geert

Ricardo Momm

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Hide Diagram Note Element
« Reply #4 on: January 26, 2011, 11:46:30 pm »
I searched the forum and didn´t find anything.

I´m taking a new approach, i´ll change the note in the diagram to a text-reference, something like "#1" and in my generated document there will be a table with all references on the diagram and associated notes.




Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hide Diagram Note Element
« Reply #5 on: January 26, 2011, 11:53:52 pm »
A search for t_image got me following result: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1256929919/0#0

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Hide Diagram Note Element
« Reply #6 on: January 27, 2011, 08:52:15 am »
Just a (nonsense?) thought: how about making the note very tiny. I know you can assign any meaningless size to any diagram element. Having it at one pixel size might be okay?

q

Ricardo Momm

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Hide Diagram Note Element
« Reply #7 on: January 27, 2011, 09:16:03 pm »
I tried that but I had solved changing the diagram note text to "#n" (where "n" is a sequential number),  resizing to a small size, and in my generated document, after the diagram image I put one table with two columns, one with the reference to the note "#n" and another with the note text. Very very elegant!

Thank´s to all for the help.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Hide Diagram Note Element
« Reply #8 on: January 28, 2011, 11:53:30 am »
Quote
I tried that but I had solved changing the diagram note text to "#n" (where "n" is a sequential number),  resizing to a small size, and in my generated document, after the diagram image I put one table with two columns, one with the reference to the note "#n" and another with the note text. Very very elegant!

Thank´s to all for the help.
Yes  Ricardo,
I discovered yesterday that you can't show only PART of a Note's Text...  That is, you can't use Set Feature Visibility [Ctrl+Shift+Y] to set the length of the note you wish to display.

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

philchudley

  • EA User
  • **
  • Posts: 744
  • Karma: +21/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Hide Diagram Note Element
« Reply #9 on: January 29, 2011, 02:09:05 am »
Here's my suggestion, assuming you are using version 8

Use diagram filters to elements, this works the opposite way round to your first think!

I am not sure how you add your notes, but the following is how you would hide a Note Element and a Text Element (both added from the Coomon toolbox)

1) Open up the Diagram Filters view
2) Create a filter which selects elements whose object type is One Of every object type EXCEPT NOTE and TEXT
3) Set the Filter option to Hide from the DropDown list
4) Check the filter on, and you should see all the Notes/Text dissapear

Then when you create your documentation the diagram will print without the notes (confirmed by Print Preview)

In step 2), use the ... button to select all element types and then unselect NOTE and TEXT

If you are using just one note type then the filter is just a simple object type not equals

I am not sure if there is an API method to apply an existing filter to a diagram, I cannot locate one in the current user guide

Hope this helps

Cheers

Phil
Models are great!
Correct models are even greater!