Greetings All,
I thought using if/not used the following logic
Meaning, if 'a' was null (nil?) then do 'b'. Is that not correct?
I wrote a routine to insert an image based on the drawing's filename (image and cad name are the same) however we have a couple of different image types, TIFFs and CALs. What I''d like to do is have the routine check for filename.tif and if it doesn't find it then look for filename.cal.
The following code produces nil:
Thanks
I thought using if/not used the following logic
Code:
(if (not a)
(b)
)
I wrote a routine to insert an image based on the drawing's filename (image and cad name are the same) however we have a couple of different image types, TIFFs and CALs. What I''d like to do is have the routine check for filename.tif and if it doesn't find it then look for filename.cal.
The following code produces nil:
Code:
(setq filename (getvar "dwgname"))
(setq filename (substr filename 1 (- (strlen fileName) 3)))
(setq filename (strcat (getvar "dwgprefix") filename "tif"))
(if (not filename)
(setq filename (strcat (getvar "dwgprefix") filename "cal"))
)
(command "image" "a" filename "0,0" "1" "0")
Thanks