Nevron Forum

Composite Shape Plug in Line

https://www.nevron.com/Forum/Topic4067.aspx

By Volvick Derose 1 - Monday, August 30, 2010

Assume that I have a composite shape with a line as shown by the picture. When using the composite shape, I want both ends of the line to be connected to a rectangle for instance when users move the composite shape closed to the port of a rectangle, the line can be connected to that port. The problem I have with the composite shape, once the shape is composed, the line cannot be identified from that shape.

Is there a way to solve this problem without adding port to the line then draw a line to connect it to the rectangle.

I try to solve this problem by using a group, however when the line is rotated, the circle does not, so that make the group solution unsuitable

See the attached picture, what is the best way to solve this problem either using group or composite shape?
By Nevron Support - Monday, August 30, 2010

Hi,

the easiest way is to group the line and the circle together and set the shape type of the group to Shape1D:

group.ShapeType = ShapeType.Shape1D;

By Volvick Derose 1 - Monday, August 30, 2010

Solved

thanks