<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Lisp to change path of certain images in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416334#M2074</link>
    <description>&lt;P&gt;I've been going around this the wrong way I think&lt;/P&gt;
&lt;P&gt;I've only got two images in the drawing for the sake of argument image1 and image2.&lt;/P&gt;
&lt;P&gt;I want to make the path of those two relative.&lt;/P&gt;
&lt;P&gt;Can the SAVE and QUICKSAVE commands be edited to make those two image paths relative and then save or quick save?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2025 08:06:39 GMT</pubDate>
    <dc:creator>h_s_walker</dc:creator>
    <dc:date>2025-04-09T08:06:39Z</dc:date>
    <item>
      <title>Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369284#M2064</link>
      <description>&lt;P&gt;Ok long explanation time&lt;/P&gt;
&lt;P&gt;Our template has 3 images in there, call them&lt;/P&gt;
&lt;P&gt;image1, image 2 and image3.&lt;/P&gt;
&lt;P&gt;These images are saved on our server in Z:\....\Projects\Template&lt;/P&gt;
&lt;P&gt;Now when we save a drawing&amp;nbsp; we save it in Z:\....\Projects\Job Number Job Name\Dwgs&lt;/P&gt;
&lt;P&gt;In that directory we also have a duplicate of image1, image2 and image3.&lt;/P&gt;
&lt;P&gt;Is there any way of changing the path of these three images (one time only) when the drawing is first saved from "Z:\....\Projects\Template" to "Z:\....\Projects\Job Number Job Name\Dwgs"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry forgot to mention this needs to work in AutoCAD LT2025&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 16:41:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369284#M2064</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-03-13T16:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369543#M2065</link>
      <description>&lt;P&gt;Nevermind.. I don't think LT has Reference Manager...&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/changing-path-of-image-xrefs-by-lisp/td-p/7838002" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/changing-path-of-image-xrefs-by-lisp/td-p/7838002&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 17:46:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369543#M2065</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-13T17:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369550#M2066</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;updated to work with images&lt;/P&gt;&lt;P&gt;Found this on another thread which should work on LT by SLW210 (Steve Wilson)...give it a try:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cadtutor.net/forum/topic/90022-change-image-path-in-many-drawings/" target="_blank" rel="noopener"&gt;https://www.cadtutor.net/forum/topic/90022-change-image-path-in-many-drawings/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;;; Updated to accommate for images and not xrefs
;;; Update image paths in a folder of drawings.                                                                                            |
;;;                                                                                                                                        |
;;; https://www.cadtutor.net/forum/topic/90022-change-image-path-in-many-drawings/?do=findComment&amp;amp;comment=649609                           |
;;;                                                                                                                                        |
;;; By SLW210 (Steve Wilson)                                                                                                               |
;;;________________________________________________________________________________________________________________________________________|
;;;                                                                                                                                        |
;;; Original- August 26th, 2024                                                                                                            |
;;;                                                                                                                                        |
;;;________________________________________________________________________________________________________________________________________|
;;;                                                                                                                                        |


(defun c:UPP () (c:UpYourPath))		;; You can change the shortcut to suit what is convenient for you (remember to also change the prompt at the end of the LISP).

(defun c:UpYourPath (/		old-path   new-path   dir
		     files	file	   doc	      model-space
		     paper-space	   imgref     repath    BrowseForFolder
		    )
  ;; Set the old and new paths
  (setq old-path "C:\\***\\****\\Old Path")                     ;; Add your current file path here.
  (setq new-path "C:\\***\\****\\New Path")                     ;; Add the new file path here. 

 (vl-load-com)
; Repath images
; Arguments:
; obj-arg = vl obj
; old-path-arg = original path
; new-path-arg = replacement path
 (defun repath (obj-arg old-path-arg new-path-arg)
      (if
        (and
          (vlax-property-available-p obj-arg 'ImageFile) ; image Object
(eq (strcase (vl-filename-directory (vla-get-ImageFile obj-arg))) (strcase old-path-arg))
        ) 
        (vla-put-ImageFile obj-arg (strcat new-path-arg "\\" (vl-filename-base (vla-get-ImageFile obj-arg)) (vl-filename-extension (vla-get-ImageFile obj-arg))))
       )
 )

 ;; This function is written by Lee Mac and it utilizes the BrowseForFolder method of the Windows Shell Object to provide a dialog interface through which the user may select a directory. 
 ;; Function Syntax: (Browse for Folder)
 ;; Function Returns: FolderPath
 
 (defun BrowseForFolder ( / err fld FolderPath shl slf )
  (setq err (vl-catch-all-apply
    (function (lambda ( / app hwd )
      (if (setq app (vlax-get-acad-object)
        shl (vla-getinterfaceobject app "shell.application")
        hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
        fld (vlax-invoke-method shl 'browseforfolder (if (vl-catch-all-error-p hwd) 0 hwd) "" 0 ""))
        (setq slf (vlax-get-property fld 'self)
        FolderPath (vlax-get-property slf 'path)
        FolderPath (vl-string-right-trim "\\" (vl-string-translate "/" "\\" FolderPath)))
      ))
    ))
  )
  
  (if slf (vlax-release-object slf))
  (if fld (vlax-release-object fld))
  (if shl (vlax-release-object shl))
  (if (vl-catch-all-error-p err) (prompt (vl-catch-all-error-message err)) FolderPath)
 )
  ;; Prompt user to enter the folder path
  (if (eq "acad" (getvar "program"))
   (setq dir (BrowseForFolder))) ;; Use window to select folder not supported in LT
   (setq dir
    (getstring T
     "\nEnter the folder path containing the DWG files: "
    )
   )                                                              ;; When prompted type in file path to folder of drawings to update.
  )

  ;; Check if folder valid
  (if (not (vl-file-directory-p dir))
    (progn
      (princ "\nInvalid folder. Exiting.")
      (exit)
    )
  )

  ;; Get list of DWG files in the folder
  (setq files (vl-directory-files dir "*.dwg" 1))

  ;; Loop through each file
  (foreach file	files
    (setq doc (vla-open	(vla-get-Documents (vlax-get-acad-object))
			(strcat dir "\\" file)
	      )
    )

    ;; Access model space and paper space
    (setq model-space (vla-get-ModelSpace doc))
    (setq paper-space (vla-get-PaperSpace doc))

    ;; Loop through objects in model space
    (vlax-for obj model-space
     (repath obj old-path new-path) ; use repath function
    )

    ;; Loop through objects in paper space
    (vlax-for obj paper-space
     (repath obj old-path new-path) ; use repath function
    )

    ;; Save and close the drawing
    (vla-save doc)
    (vla-close doc)
  )

  ;; Notify process is complete
  (princ "\nImage paths updated successfully.")
)

(princ
  "\nLoad the script and run 'UPP' or 'UpdateImagePaths' to start."
)(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 21:15:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369550#M2066</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-13T21:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369894#M2067</link>
      <description>&lt;P&gt;If you want to change all images with old paths and replace them with new paths found only in the current drawing, then load &amp;amp; run this lisp function which again should work in LT:&lt;/P&gt;&lt;P&gt;Note: you'll have to update this section of the code to match with your old &amp;amp; new paths:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  ;; Set the old and new paths
  (setq old-path "Z:\\....\\Projects\\Template")                  ;; Add your current file path here.
  (setq new-path "Z:\\....\\Projects\\Job Number Job Name\\Dwgs") ;; Add the new file path here. &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lisp file: &lt;STRONG&gt;UpdImgP.lsp&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;;; UpdImgP find all matching image paths in current drawing &amp;amp; replace them
;;; modified from:
;;;                                                                                                                                        |
;;; https://www.cadtutor.net/forum/topic/90022-change-image-path-in-many-drawings/?do=findComment&amp;amp;comment=649609                           |
;;;                                                                                                                                        |
;;; By SLW210 (Steve Wilson)                                                                                                               |
;;;________________________________________________________________________________________________________________________________________|
;;;                                                                                                                                        |
;;; Original- August 26th, 2024                                                                                                            |
;;;                                                                                                                                        |
;;; OP:
;;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/td-p/13369284

(defun c:UpdImgP (/ doc	model-space new-path old-path paper-space	repath)
  ;; Set the old and new paths
  (setq old-path "Z:\\....\\Projects\\Template")                  ;; Add your current file path here.
  (setq new-path "Z:\\....\\Projects\\Job Number Job Name\\Dwgs") ;; Add the new file path here. 
  
 (vl-load-com)
; Repath images
; Arguments:
; obj-arg = vl obj
; old-path-arg = original path
; new-path-arg = replacement path
 (defun repath (obj-arg old-path-arg new-path-arg)
      (if
        (and
          (vlax-property-available-p obj-arg 'ImageFile) ; image Object
          (eq (strcase (vl-filename-directory (vla-get-ImageFile obj-arg))) (strcase old-path-arg))
        ) 
        (vla-put-ImageFile obj-arg (strcat new-path-arg "\\" (vl-filename-base (vla-get-ImageFile obj-arg)) (vl-filename-extension (vla-get-ImageFile obj-arg))))
      )
 )
    ;; get current acad doc
    (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
  
    ;; Access model space and paper space
    (setq model-space (vla-get-ModelSpace doc))
    (setq paper-space (vla-get-PaperSpace doc))

    ;; Loop through objects in model space
    (vlax-for obj model-space
     (repath obj old-path new-path) ; use repath function
    )

    ;; Loop through objects in paper space
    (vlax-for obj paper-space
     (repath obj old-path new-path) ; use repath function
    )

  ;; Notify process is complete
  (princ "\nImage paths updated successfully.")
)
(princ "\nEnter 'UpdImgP' to start.")(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 20:43:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13369894#M2067</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-13T20:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13370675#M2068</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;unfortunately that won't work. The job number and job name are always changing.&lt;/P&gt;
&lt;P&gt;eg I could be working on a drawing with the details 1234 Site A&lt;/P&gt;
&lt;P&gt;my colleague could be working on a drawing with the details 7890 Site Z&lt;/P&gt;
&lt;P&gt;My colleagues have less lisp knowledge than I do, and asking them to edit the lisp every time is a recipe for disaster&lt;/P&gt;
&lt;P&gt;I forgot to mention I need this to happen automatically the first time that the template is saved&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 09:15:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13370675#M2068</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-03-14T09:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13370877#M2069</link>
      <description>&lt;P&gt;Well since you know these three image file names as&amp;nbsp;&lt;SPAN&gt;image1, image 2 and image3 and these are already saved in the project folder location then&amp;nbsp;in theory the code can then search for these specific image file locations and when found save the project folder path as the new path for the images. Then place the code to run at startup so that the next time the dwg is opened from the project folder location these three image paths will be automatically replaced. Though this means the code would have to run each time the dwg opens that would still work when the dwg is opened from the server since the code would find the three images at that location as well.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 10:52:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13370877#M2069</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-14T10:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13414543#M2070</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;sorry about the VERY LATE getting back.&lt;/P&gt;
&lt;P&gt;That won't work.&lt;/P&gt;
&lt;P&gt;Sometimes the client asks for the drawing and the problem arises if the client does not use the same directory structure we do, it won't load up the image. That's why I need the path to be relative, then we can tell the client to put all the files in the zip in the same directory.&lt;/P&gt;
&lt;P&gt;Also now it's going to be drive J and we only have two images to change on the first save&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 10:56:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13414543#M2070</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-08T10:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415205#M2071</link>
      <description>&lt;P&gt;That's the beauty of having all the files stored in the same directory regardless of the image being attached with full path...&lt;/P&gt;&lt;P&gt;Autocad will look for the image in the same folder as the current drawing so you're good to go.&lt;/P&gt;&lt;P&gt;Give it a test and you're see that it works&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 17:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415205#M2071</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-08T17:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415444#M2072</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think you need to change the images' paths to relative, maybe like run the following once, once the drawing is saved to a new directory where images 1, 2 and 3 are there.&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(setq image_extension ".jpg"
      dwg_path (strcat (getvar 'dwgprefix)) 
)
(foreach image (vl-remove-if-not '(lambda (image) (member (vl-filename-base (vla-get-imagefile image)) '("image1" "image2" "image3")))
		 		  (mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex (ssget "_x" '((0 . "image")))))))
		)
  
  (if (findfile (strcat dwg_path (setq image_name (vl-filename-base (vla-get-imagefile image))) image_extension))
    (vla-put-imagefile image (strcat ".\\" image_name image_extension))
  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 20:04:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415444#M2072</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-08T20:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415924#M2073</link>
      <description>&lt;P&gt;You can do a reactor trapping SAVE so could check are the image files existing in the dwg directory, if not copy to that directory, there is a VL file copy command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can embed images in a dwg would that be easier ?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 03:30:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13415924#M2073</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-04-09T03:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416334#M2074</link>
      <description>&lt;P&gt;I've been going around this the wrong way I think&lt;/P&gt;
&lt;P&gt;I've only got two images in the drawing for the sake of argument image1 and image2.&lt;/P&gt;
&lt;P&gt;I want to make the path of those two relative.&lt;/P&gt;
&lt;P&gt;Can the SAVE and QUICKSAVE commands be edited to make those two image paths relative and then save or quick save?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 08:06:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416334#M2074</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-09T08:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416367#M2075</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;whom you've addressed your last post to?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 08:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416367#M2075</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-09T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416391#M2076</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;Anyone who has an idea about how to do it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 08:45:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416391#M2076</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-09T08:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416459#M2077</link>
      <description>&lt;P&gt;well, having done a lisp program to set image path to relative you can implement it in a whatever customizable save* menu item to be first before save command.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 09:31:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416459#M2077</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-09T09:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416481#M2078</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;As I have said before I am not knowledgeable in lisp. I need all the help I can get&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 09:39:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416481#M2078</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-09T09:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416627#M2079</link>
      <description>&lt;P&gt;the function to set relative path to every image listed as parameter list goes below&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun make_relative (image_name_list image_extension / image_extension dwg_path image_name image_sset)
	(setq dwg_path (strcat (getvar 'dwgprefix)))
	(foreach image (vl-remove-if-not '(lambda (image) (member (vl-filename-base (vla-get-imagefile image)) image_name_list))
					  (if (setq image_sset (ssget "_x" '((0 . "image")))) 
					  	(mapcar 'vlax-ename-&amp;gt;vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex image_sset))))
					  )
				   )
  
	  (if (findfile (strcat dwg_path (setq image_name (vl-filename-base (vla-get-imagefile image))) image_extension))
	    (vla-put-imagefile image (strcat ".\\" image_name image_extension))
	  )
	)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;you can call it like&lt;/P&gt;&lt;P&gt;(make_relative '("image1" "image2") ".jpg")&lt;/P&gt;&lt;P&gt;or add to a quick access bar for instance (not sure if this can be done in lt)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="komondormrex_0-1744196462220.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1487397iB59CA167BB832368/image-size/medium?v=v2&amp;amp;px=400" role="button" title="komondormrex_0-1744196462220.png" alt="komondormrex_0-1744196462220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 11:01:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416627#M2079</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-04-09T11:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416870#M2080</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt;&amp;nbsp;I need it do do it automatically ie not typing in the references manually, and I also need it to work whenever a save or quicksave is initiated.&lt;/P&gt;
&lt;P&gt;This is where the images are saved&lt;/P&gt;
&lt;P&gt;J:\0_Base Directory\0000oooo\Dwg\04_Logos\Image1.png&lt;/P&gt;
&lt;P&gt;J:\0_Base Directory\0000oooo\Dwg\04_Logos\Image2.jpg&lt;/P&gt;
&lt;P&gt;The resultant drawing will always be saved in the dwg folder.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 13:12:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416870#M2080</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-09T13:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416924#M2081</link>
      <description>&lt;P&gt;any reason for storing those image files in a subfolder under Dwg:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dwg\04_Logos&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Your problem will be solved if those images are saved directly under folder &lt;STRONG&gt;Dwg&lt;/STRONG&gt; which is where all the rest of the drawing files are saved&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 13:38:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416924#M2081</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-09T13:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416964#M2082</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;The powers that be want to keep the drawing directory as free from clutter as possible, just the drawings in there.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 13:58:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13416964#M2082</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2025-04-09T13:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change path of certain images</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13417058#M2083</link>
      <description>&lt;P&gt;The powers that be seem to have mixed standards. Why would they not do the same with the template dwg folder?&lt;/P&gt;&lt;P&gt;Instead of saving images in the same folder as other template files under&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Z:\....\Projects\Template&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There should be again a subfolder&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;\04_Logos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then these template files can be modified so the images are attached using relative instead of full paths. Then when the template file is saved from the server into the project folder location with the exact subfolder structure &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;\04_Logos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the problem would not occur in the first place.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 14:48:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-path-of-certain-images/m-p/13417058#M2083</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-04-09T14:48:17Z</dc:date>
    </item>
  </channel>
</rss>

