purge all unused AcDbRasterImageDef entities

purge all unused AcDbRasterImageDef entities

GeryKnee
Advocate Advocate
560 Views
2 Replies
Message 1 of 3

purge all unused AcDbRasterImageDef entities

GeryKnee
Advocate
Advocate

Atouching a RasterImage in a document (for example "C:\Demo.jpg"), and deleting the object, AcDbDictionary item ("Demo") and AcDbRasterImageDef item ("C:\Demo.jpg"), remains, and purge ALL cannot remove the reference,. It ausses the result , autocad to prevent "C:\Demo.jpg" path to be deleted using windows explorer
(allthow , you deleted the created instace). Is there a way to purge them using a lisp code ?? That will be a code that purges all DB references to unused Raster Images.

Thanks,

Gery

0 Likes
561 Views
2 Replies
Replies (2)
Message 2 of 3

Sea-Haven
Mentor
Mentor

If you attach an image its in the xref list, if you erase the image its removed, so why would you say delete via the object dictionary not sure exactly what your doing. 

0 Likes
Message 3 of 3

GeryKnee
Advocate
Advocate

Hello sea.haven.

Thanks.

I'll clarify what's the problem.

I give an example.

In the Windows Folder Example there are two files

1) The [001.dwg] drawing file 

2) The [Image.jpg] raster image.

The 001.dwg is a blank AutoCAD drawing.

I select the [Image.jpg]  image clicking on it.

I type DEL.

The windows shell deletes the image.

Nothing prevents the the [Image.jpg] deletion.

Now, I undelete the [Image.jpg]

In the Windows Folder Example there are again two files

1) The [001.dwg] drawing file 

2) The [Image.jpg] raster image.

 

I open the 001 drawing and I attach the the [Image.jpg].

I delete the attached image in AutoCAD drawing.

The AutoCAD Drawing is a "Blank" document again, but it’ a difficult state for my Windows System.

 

Although I have not the image on my drawing,

     I CAN’T DELETE the the [Image.jpg]

       System tells me that the file is used by AutoCAD application.

       I have to close the AutoCAD Application in order to delete it.

    If I save the AutoCAD Drawing, Opening it again, I have the same problem.

That’s because still remain in AutoCAD document the AcDbRasterImageDef reference.

So I need a code that will turn my drawing to the initial state (the absolutely blank document).

Regards,

Gery

 

 

0 Likes