Author Topic: How to edit a PolylineCurve2d constructor  (Read 2403 times)

0 Members and 1 Guest are viewing this topic.

Proctor

  • Guest
How to edit a PolylineCurve2d constructor
« on: August 12, 2010, 01:27:03 PM »
Hello: I'm working in Autocad 2009 .net api.

I have created a PolylineCurve2d and now can't figure out how to edit it. Here's my code I used to
create it:

Code: [Select]
Sub CreatePolylineCurve2d()
            Dim myPoints As New Geometry.Point2dCollection
            Dim myPLine As New PolylineCurve2d()
     
            For j As Integer = 0 To myEdge.lstLinesInEdge.Count - 1
                Dim oLine As Line = myEdge.lstLinesInEdge(j)
                Debug.Print(oLine.Length.ToString())
                oLine.Color = Autodesk.AutoCAD.Colors.Color.FromColor(Drawing.Color.MediumSeaGreen)
                myPoints.Add(New Geometry.Point2d(oLine.StartPoint.X, oLine.StartPoint.Y))
                myPoints.Add(New Geometry.Point2d(oLine.EndPoint.X, oLine.EndPoint.Y))
                myPLine = New PolylineCurve2d(myPoints)
            Next
            myPoints.Clear()
        End Sub

Now, I try to edit it - I try to do something like this:
Code: [Select]
myPLine.StartPoint = myOtherLine.EndPoint

And it tells me that myPLine's StartPoint is read only. What do I need to do to make my poly editable? I realize that this object is not a database object so I'm not sure if it's not editable?

Thanks for your help,
Proctor

xsfhlzh

  • Guest
Re: How to edit a PolylineCurve2d constructor
« Reply #1 on: August 14, 2010, 09:12:11 AM »
PolylineCurve2d.SetFitPointAt Method