Author Topic: Removing the saved path of an attached image  (Read 1770 times)

0 Members and 1 Guest are viewing this topic.

iliekater

  • Guest
Removing the saved path of an attached image
« on: June 24, 2007, 08:20:26 AM »
I have inserted (attached) some images in drawing of mine , but I no longer want them to metain their saved path (as seen in the Image Manager) . I want instead only their Name to be saved (since I am going to place then in a support path - I am no longer going to use a full path) . Is it possible ?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Removing the saved path of an attached image
« Reply #1 on: June 24, 2007, 10:45:15 AM »
Yes, use the ImageFile property of the Raster object. Set it to equal the the Name property and this will remove the Path.
Code: [Select]
(if (ssget "x" '((0 . "IMAGE")))
  (progn
    (setq ss (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
    (vlax-for obj ss
       (vla-put-ImageFile obj (vla-get-name obj))
     )
   )
)
Not tested but it should be close to what you need.