Image references don't appear to be updating properly - Bricscad 2014 x64
Has anybody else run into problems with Bricscad and image references?
I've developed a LISP application that imports images taken from GPS enabled cameras. Part of what the program does is to generate image sheets (4 images per sheet) by reading images from a folder specified by the user. The images are named/numbered sequentially by the camera.
Users will sometimes delete images from the folder, rename the remaining images to retain the naming sequence and re-import the images.
What's happening is that the deleted images continue to show up on the sheets. I'm taking care in the application to detach and delete all of the images before re-importing. I'm pretty sure this is a Bricscad bug, because I can take the same drawing, after the re-import and open it in AutoCAD and the correct images will display (see attached images).
What's really weird is that Bricscad is displaying images that have been deleted from the disk! It's almost as if it's storing the images internally.
Rick
Comments
-
Hi Rick,
BricsCAD caches images locally to improve performance. This is probably why you are still seeing the images even if they've been deleted from the disk.
To fix you can delete the contents of the ImageCacheFolder (close BricsCAD first), which you can find under SETTINGS.
I would also raise a support request. BricsCAD should handle this sort of situation without issue.
Regards,Jason Bourhill
CAD Concepts2014-10-01_8-13-52.png0 -
Thanks Jason.
That explains it.
Rick
Hi Rick,
BricsCAD caches images locally to improve performance. This is probably why you are still seeing the images even if they've been deleted from the disk.
To fix you can delete the contents of the ImageCacheFolder (close BricsCAD first), which you can find under SETTINGS.
I would also raise a support request. BricsCAD should handle this sort of situation without issue.
Regards,Jason Bourhill
CAD Concepts0 -
Rick,
I have seen similar behavior when copying and pasting from other drawings. Some times the data pasted in is the same as the previous past. I take care of this by issuing the PURGE command and then the new data pastes in correctly. This would work if your routine first deletes the images from the drawing, purges the drawing, and then reinsert the images. From your description, I believe you just have to add the purge command
Eric Fredrickson
0 -
Eric:
Thanks for the advice.
I don't think the purge command affects images. In my LISP program, I'm detaching the images after deleting them. I think the real issue, as Jason points out, is that the image cache needs to be purged. Unfortunately, this apparently can't be done while Bricscad is running.
What's really needed here is either a way to disable the image cache, or have the cache folder unlocked, so that images can be selectively removed as needed.
Rick
Rick,
I have seen similar behavior when copying and pasting from other drawings. Some times the data pasted in is the same as the previous past. I take care of this by issuing the PURGE command and then the new data pastes in correctly. This would work if your routine first deletes the images from the drawing, purges the drawing, and then reinsert the images. From your description, I believe you just have to add the purge command
Eric Fredrickson
0 -
BricsCAD maintains and imagecache in the temp folder. The imagecache does get updated correctly in a number of scenarios but it will not be updated if you delete an image file 123.jpg and rename an older image to 123.jpg in its stead. With the current design the file 123.jpg.somenumber.mtl in the imagecache should then be removed manually. No manual intervention is needed if you edit 123.jpg or replace it by a newer file.
We can look into ways to improve the maintenance of the cache. Please enter a support request for this. Also we're interested in other scenarios.
Kind regards , Alexander Van Heuverzwyn0 -
Here is a scenario:
Requirements:
Two .bmp files with different sizes and sys times: A.bmp and B.bmp.
1. Delete all files in the ImageCache folder.
2. Attach the images to a DWG, save and then exit BricsCAD.
3. Rename the files by exchanging their names. So A.bmp is now B.bmp and vice versa.
4. Reopen the DWG.
5. Result: The DWG shows the images as if the renaming operation has not taken place.
This seems to contradict Alexander's statement: 'No manual intervention is needed if you edit 123.jpg or replace it by a newer file'.0 -
Ah... 'Newer' for the Image Cache means newer than the drawing. Obviously a more sophisticated checking mechanism is required. Although using something like checksum would probably be too slow and defy the purpose.
In any case you need to be able to switch image caching off (perhaps by setting ImageCacheMaxMemory to 0) and manually force an update of the cache.0