Profile Picture

Issue with Duplicate Line

Posted By Ashley Davy 3 Years Ago
Author
Message
Ashley Davy
Problem Posted 3 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 3 Years Ago
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
Posted 3 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,018
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





Similar Topics


Reading This Topic