Jump to content

Pdf underlay & Raster Image paths?


Recommended Posts

Posted

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,

  • 8 months later...
Posted

[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]

Posted

XR at command prompt. Same dialog box for PDF, IMAGE etc and you can give new path

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...