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

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