Quantcast
Channel: Autodesk AutoCAD forums
Viewing all articles
Browse latest Browse all 14319

image attach lisp

$
0
0

i am working on a lisp to attach an image with

 

(command "-image" "attach" path "0,0" "1" "0")  where 'path' is the prefix and image name set from a dialog box.

 

how can i get the program to error if the image does not exist- i.e., the name was incorrectly entered?  i have tried

 

(if  (= str "*Image not found*")
   (alert ":: ERROR :: Image not found")
)

 

and


(if (/= str "*Image not found*")
 (command "-image" "attach" path "0,0" "1" "0")
 (alert ":: ERROR :: Image not found")

)

 

the alert comes up regardless of whether or not the image exists.


Viewing all articles
Browse latest Browse all 14319

Trending Articles