Message 1 of 3

Not applicable
12-18-2017
08:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following code is supposed to loop through each line in the drawing and get the startpoint x, y and z values but instead I error 451. I copied this code from something else that works so I am at a loss here.
Sub Get_Points()
Dim ent As AcadEntity
Dim name As String
Dim x As Double
Dim y As Double
Dim z As Double
For Each ent In ThisDrawing.ModelSpace
If TypeOf ent Is AcadLine Then
name = ent.Handle
x = ent.StartPoint(0)
y = ent.StartPoint(1)
z = ent.StartPoint(1)
End If
Next
End Sub
Solved! Go to Solution.