cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to hide a line in a DiagramType

alros
Super Contributor

We have a DiagramType modeled where we put Applications into Server-Container shapes. Now if an Application is connected to a Server on the diagram instance, but not placed inside the component (for example the Application is connected to two Servers and we add the Application twice, once for each Server-Container), a line appears on the Diagram; see this image.

 

I have set the default line width in the corresponding DiagramTypeLink to "0", set the color to the background color (white) and set the transparency of the color to 100% without success (The line width is shown as 0pt in the line style dialog etc., but it is still visible). What is the proper way to tell MEGA to hide these lines under any circumstances but still connect Applications when placed inside the Server-Containers?

2 Replies

alros
Super Contributor

Thanks for your answer, lionel.

 

Unfortunately, your proposed solution doesn't work at all; the behaviour remains unchanged.

 

See the screenshots for reference (http://imgur.com/a/DJNbr)

 

We did exactly as you described; disconnecting the DiagramTypeLink from the original DiagramTypeView and adding a new DiagramTypeView only containing the links and with DiagramTypeVisibility unchecked.


Even after recompiling the Metamodel, the behaviour remained the same.

Note that in the reference Image, the two application objects are the same and the underlying containers are two distinct servers.

__________________________________________

EDIT:

We have found out that existing Diagrams have to be changed manually hiding the new view as a last step.

lionel
MEGA
MEGA

Hello alros,

 

Defining link color to background color (white in your case) does not seem a good idea as it will appear as soon as the background is not white (which will occur for example for the beginning of the line, before it "gets out" of the application.)

 

But if you want to do it, it should work normally, knowing that the "DiagramTypeLink PenColor" Attribute must be set with RGB values (255,255,255 for white).

  • Note that it will work only for new links. Links already displayed in diagrams will not be modified.

But you could also disconnect the link from it's actual View (DiagramTypeView), create a new DiagramtTypeView for the concerned DiagramTypeParam, and uncheck the DiagramTypeVisibility for this new DiagramTypeView

Note that :

  • You need to translate/compile the metamodel
  • Existing links in diagram will not be shown J