Code Red => AutoLISP (Vanilla / Visual) => Topic started by: densan on June 11, 2019, 08:32:22 PM
Title: Edit path type for images via lisp
Post by: densan on June 11, 2019, 08:32:22 PM
Hello everyone, I am trying to find a function to set the path of attached images to NONE. I am familiar with the reference manager tool but I am looking for automation via lisp, as it will be part of a major cleanup process in 1000's of drawings.
Found the following code but it's only removing the path for one image even though the drawing contains multiple images. I only know basic lisp concepts but I don't understand why the code it's not looping. Thank you for any help you can offer,
Title: Re: Edit path type for images via lisp
Post by: kdub_nz on June 11, 2019, 09:55:19 PM
Welcome to the swamp.
Jeff's routine works for me. This is from BricsCAD V19
I can't see anything in the code that would fail and cause your issue in AutoCAD.
Title: Re: Edit path type for images via lisp
Post by: densan on June 12, 2019, 11:11:09 AM
Thank you Kdub, I moved the lisp to a trusted location folder and the weird behavior disappeared. May I ask, what would be the correct way to add an IF statement (line 5 in revised code) or a way to process the function if images exist in the drawing.