Huibert Posted October 8, 2008 Posted October 8, 2008 I encounter an error when selecting a polyline (the same code works fine for 3dpolyline, line and arc) Dim Pick As Variant Dim Polyline As AcadPolyline ThisDrawing.Utility.GetEntity Polyline, Pick, vbCr & "Select the polyline" I tried to find the problem but the only thing I found is that when selecting a polyline, the entity is not of type AcadPolyline. Why?? And how can I select a polyline? Dim Pick As Variant Dim Polyline As AcadPolyline ThisDrawing.Utility.GetEntity Ent, Pick, vbCr & "Select the polyline" If TypeOf Ent Is AcadPolyline Then Set Polyline = Ent End If Quote
SEANT Posted October 8, 2008 Posted October 8, 2008 Autodesk has made it a bit confusing with the various polyline entities and how they are referred to in the application versus API context. The bottom line for your situation is: Dim LWPolyline As AcadLWPolyline . . . . If TypeOf Ent Is AcadLWPolyline Then Set LWPolyline = Ent Quote
Huibert Posted October 8, 2008 Author Posted October 8, 2008 Thanks for the solution. The program works as it should. Thank you very much Huibert Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.