muck Posted December 28, 2010 Posted December 28, 2010 AutoCAD 2010 Is there a way to change a pdf underlay path when drawing files are moved? Is there a way to set the pdf path to match the drawing location so when a drawing and pdf is moved and they have the same path the pdf will be linked to the drawing? The same can be asked about raster image files & AutoCAD Is there a way to set the raster image file to match the drawing location so when a drawing and rastor image is moved and they have the same path the raster image will be linked to the drawing? Thank you, Quote
SLW210 Posted September 21, 2011 Posted September 21, 2011 Please read CODE POSTING GUIDELINES. Quote
JPD_1962 Posted September 21, 2011 Posted September 21, 2011 [indent]; tested using AutoCAD 2011 ; this is the list that is generated knowing the before and after paths of underlays (setq UNDERLAYLIST (list (list "C:\\A-02.pdf" "C:\\PROJ1\\TEST\\A-02.pdf") (list "C:\\TEMP\\My Markups.dwfx" "C:\\PROJ1\\TEST\\My Markups.dwfx") (list "C:\\TEMP\\Drawing2-Model.dwf" "C:\\PROJ1\\TEST\\Drawing2-Model.dwf") (list "C:\\a001.dgn" "C:\\PROJ1\\TEST\\a001.dgn") )) ; this is the code that is run to process the list and change the path of all underlays in the list (vl-load-com) (vlax-for Blk (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object))) (if (and (= (vla-get-IsXref Blk) :vlax-false) (not (wcmatch (vla-get-name Blk) "*|*"))) (vlax-for Obj Blk (if (and (vlax-write-enabled-p Obj) (and ;_ UNDERLAY (wcmatch (vla-get-ObjectName obj) "*Reference") (vlax-property-available-p Obj "UnderlayName") )) (progn (if (setq UNDERLAY (assoc (vla-get-file Obj) UNDERLAYLIST)) (vla-put-file Obj (cadr UNDERLAY)) ) ) ) ) ) ) [/indent] Quote
cadvision Posted September 22, 2011 Posted September 22, 2011 XR at command prompt. Same dialog box for PDF, IMAGE etc and you can give new path Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.