I am trying to find the x and y locations of blocks already in the AutoCad document on a specific layer. Currently the code is just returning the X-position and ent.InsertionPoint(0) and ent.InsertionPoint (1) returns nothing. Any help would be great!
Dim blk As AcadBlockReference
Dim atts As Variant
Dim att As AcadAttributeReference
Dim sset As AcadSelectionSet
Dim ent As AcadEntity
Dim obj As AcadObject
'Select all that are on the dup layer
On Error Resume Next
ACAD.ActiveDocument.SelectionSets.Item("Park-Dup").Delete
Set sset = ACAD.ActiveDocument.SelectionSets.Add("Park-Dup")
sset.Select acSelectionSetAll
Dim tryBlockRef As AcadBlockReference
For Each ent In sset
If TypeOf ent Is AcadBlockReference Then
Sheet1.Cells(i, 4) = ent.InsertionPoint
End If
Next