Issue with Duplicate Line


Author
Message
Ashley Davy
Ashley Davy
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)
Group: Forum Members
Posts: 36, Visits: 119
Earlier I posted a question on how to create a line for my custom library and I was supplied the following code which works but I do have the following issue.  Also in my library I have created a 2D shape which is a triangle.  On this shape and the line shape I have the DefaultShapeGlue set to nothing.  Here is the issue.  I first drag the line to the canvas.  I then drag the triangle to the canvas and place it on the line.  When I do this the line turns red and it creates 2 other lines beneath the original line.  How can I stop the line from turning red and stop the duplicate lines being created?
Thanks,
Ashley

Private Shared Sub InitAlternativeBranch1(ByVal shape As NShape)
shape.Init1DShape(EN1DShapeXForm.Vector)
shape.EndX = 200
shape.Height = 0
Dim geometry As NGeometry = shape.Geometry

If True Then
  Dim plotFigure As NMoveTo = geometry.RelMoveTo(0R, 0.5R)
  geometry.RelLineTo(1R, 0.5R)
  plotFigure.CloseFigure = False
  geometry.ClipWithTextBlock = ENGeometryClipWithShapeBlock.Clip
End If

Dim textBlock As NTextBlock = New NTextBlock()
textBlock.ResizeMode = ENTextBlockResizeMode.TextSize
textBlock.SetFx(NTextBlock.AngleProperty, "-ATAN2($Parent.EndY - $Parent.BeginY, $Parent.EndX - $Parent.BeginX)")
shape.TextBlock = textBlock
End Sub

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi,

The functionality you are talking about is called Connector Splitting.

You can disable it in any of the following ways:
  1. To disable it for the whole page and all shapes on it, set page.Interaction.Enable1DShapeSplitting to false
  2. To disable a 2D shape split connectors set its CanSplit property to false
  3. To disable a  1D shape (for example a connector or a line) to be split from a 2D shape, set its Splittable property to false


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search