hello
who can help me?
I need select a polyline and read startpint ans end point in a current coordinate system.
I have this:
Dim id1 As ObjectId = SelectSpecificObjectType(vbLf & "Select polyline: ", GetType(Polyline))
If id1.IsNull Then
Return
End If
Private Shared Function SelectSpecificObjectType(ByVal prompt As String, ByVal objectClass As System.Type) As ObjectId
Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Using tr As Transaction = ed.Document.Database.TransactionManager.StartTransaction()
While True
Dim res As PromptEntityResult = ed.GetEntity(prompt)
If res.Status <> PromptStatus.OK Then
Return ObjectId.Null
End If
Dim ob As DBObject = tr.GetObject(res.ObjectId, OpenMode.ForRead)
If objectClass.IsAssignableFrom(ob.[GetType]()) Then
Return res.ObjectId
End If
ed.WriteMessage(vbLf & "Invalid selection, {0} entity expected", RXClass.GetClass(objectClass).DxfName)
End While
End Using
Dim lineA As Polyline = CType(acTrans.GetObject(id2, OpenMode.ForRead), Polyline)
IntersectionPointA = lineIntersectors(AuxMuroA.StartPoint, AuxMuroA.EndPoint, lineA.StartPoint, lineA.EndPoint)
i need a current user coordinates system for lineA.
thank you