- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello community.
I wanted to see if there has been any LISP routines created or can be created that takes the saved path of a tiff image that is associated with a drawing, and automatically updates the saved path to the saved path of the associated DWG file that the tiff image is associated with. I have recently found another LISP routine for a different situation and it works perfectly but when the saved path of the tiff image is different then the saved path of the dwg file, the LISP doesn't seem to work because its looking in the old saved file path. I will attach the LISP routine that I am mentioning if it helps as well as a screen shot of the "Saved path" i am referring to. Any help would be great.
(defun C:check ()
(setq images nil)
(setq images (ssget "X" (list (cons 0 "IMAGE"))))
(if images
(progn
(setq C 0)
(repeat (sslength images)
(setq img (entget (ssname images C)))
(setq img_ent (entget (cdr (assoc 340 img))))
(setq loaded (cdr (assoc 280 img_ent)))
(setq nam (cdr (assoc 1 img_ent)))
(if (findfile nam)
(setq FileFlag 1)
(setq FileFlag 0)
); if
(if (and (= FileFlag 1)(= loaded 1))
(prompt (strcat "\nIMAGE: " nam " IS Loaded and Image File FOUND."))
); if
(if (and (= FileFlag 1)(= loaded 0))
(prompt (strcat "\nIMAGE: " nam " IS NOT Loaded and Image File FOUND."))
); if
(if (and (= FileFlag 0)(= loaded 1))
(prompt (strcat "\nIMAGE: " nam " IS Loaded and Image File NOT FOUND."))
); if
(if (and (= FileFlag 0)(= loaded 0))
(prompt (strcat "\nIMAGE: " nam " IS NOT Loaded and Image File NOT FOUND."))
); if
(setq C (+ C 1))
); repeat
); progn
(prompt "\nNo Images Found!")
); if
(princ)
); function
Solved! Go to Solution.