3
特定のレイヤーのAutoCadドキュメントに既にあるブロックのxとyの位置を見つけようとしています。現在のところ、コードはX位置を返しているだけで、ent.InsertionPoint(0)とent.InsertionPoint(1)は何も返しません。どんな助けも素晴らしいだろう!AutoCad VBAは既存のブロックのX&Y位置を見つける
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
これは完全にあなたに感謝しました! – Chris