Where did you get the idea that the Item method
accepts the name of a block reference?
It doesn't. Common sense would suggest that
since there can be more than one insertion of a
block of a given name, that you could not use the
name as an index key.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005
http://www.acadxtabs.com
"dhaverstick" wrote in message
news:9442839.1098713061273.JavaMail.jive@jiveforum1.autodesk.com...
> Has anyone else had problems getting an AcadBlockReference object by
> setting it this way: Set AcadBlockRef =
> ModelSpaceObj.Item("AcadBlockRefName") where "AcadBlockRefName" is the
> name of the block reference object. Sometimes this method works and
> sometimes it doesn't. The only way I can get the BlockRef object 100% of
> the time is by iterating through all the items in Modelspace like this
> For Each EntityObj in ModelSpaceObj
> If TypeOf EntityObj is AcadBlockReference Then
> Set AcadBlockRef = EntityObj
> If AcadBlockRef.Name = "AcadBlockRefName" Then
> Exit For
> Endif
> Next
>
>
> Thanks,
>
> Darren