Group: Forum Members
Last Active: 4 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 .& nbsp ; Also in my library I have created a 2D shape which is a triangle .& nbsp ; On this shape and the line shape I have the DefaultShapeGlue set to nothing .& nbsp ; Here is the issue .& nbsp ; I first drag the line to the canvas .& nbsp ; I then drag the triangle to the canvas and place it on the line .& nbsp ; When I do this the line turns red and it creates 2 other lines beneath the original line .& nbsp ; 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
|
Group: Forum Members
Last Active: Last Month
Posts: 3,055,
Visits: 4,052
|
Hi , The functionality you are talking about is called Connector Splitting. You can disable it in any of the following ways : - To disable it for the whole page and all shapes on it, set page.Interaction.Enable1DShapeSplitting to false
- To disable a 2D shape split connectors set its CanSplit property to false
- 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
|