Thanks, will try that.
"Paul Richardson" wrote in message
news:5188545@discussion.autodesk.com...
To add to an entity to an existing block
use the "CopyObjects" method.
[code]
Dim image As AcadRasterImage
Dim pp, min, max
ThisDrawing.Utility.GetEntity image, pp
image.GetBoundingBox min, max
Dim blk As AcadBlock
Set blk = ThisDrawing.Blocks.Add(min, image.Handle)
Dim ent(0) As AcadEntity
Set ent(0) = image
Dim ret
ret = ThisDrawing.CopyObjects(ent, ThisDrawing.Blocks(image.Handle))
Dim blkRef As AcadBlockReference
Set blkRef = ThisDrawing.ModelSpace.InsertBlock(min, image.Handle, 1, 1,
1, 0)
image.Delete
[/code]
--
gl - Paul
"Rakesh Rao" wrote in message
news:5188477@discussion.autodesk.com...
I have an image (AcadRasterImage) that is already existing in the drawing
and stored in the variable ImageName (of type AcadRasterImage)
How do I add this to AcadBlockReference make a block out of the image?
The AddRaster method that I see allows only a new image to be created and
added to a AcadBlockReference but what I need it to add an existing image
(or for that matter, any object) to a Blockreference.
Any pointers?
Any help is apperciated.
Thanks in advance
Rakesh