Hi James,
While I'll agree there are SOME things that cannot be done (at least not
easily) in VBA, your example falls short. In a test drawing with at least 2
block definitions of "DM" & "DMH", and you wish to change all inserts of the
"DM" to be inserts of "DMH":
Dim oEnt As AcadEntity
Dim oBlk As AcadBlockReference
For Each oEnt In ThisDrawing.ModelSpace
If TypeOf oEnt Is AcadBlockReference Then
Set oBlk = oEnt
If oBlk.Name = "DH" Then
oBlk.Name = "DMH"
End If
End If
Next
This works just fine.
However, you are correct in that VBA, or more correctly ActiveX, does not
allow us to view/change the Xref Status. This is something we've been asking
for for years.
Jeff
"James Buzbee" wrote in message
news:5423338@discussion.autodesk.com...
CADRaven, even though most won't admit it here, when dealing with AutoCAD
objects, Lisp is so much better than VBA. This is but one of the examples.
Try swapping an insert from one block definition to another with VBA: can't
be done. But entmod . . ..
jb