Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ricardo Momm 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?
-
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
-
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.
-
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
-
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.
-
A search for t_image got me following result: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1256929919/0#0
Geert
-
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
-
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.
-
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
-
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