Author Topic: image command not working from lisp  (Read 4073 times)

0 Members and 1 Guest are viewing this topic.

Cawaugh

  • Guest
image command not working from lisp
« on: August 29, 2007, 03:07:34 PM »
Maybe someone can explain why I can type in the commands in the code below but when I try to run the code,
it tells me that it cannot fine command image.

(command "-image" "Attach" "C:/Steves_Tiffs/somefilename.tiff" "0.00,0.00" "1" "0")

This is driving me nuts.  :ugly:
All I want to do is attach a tiff file for each of my drawings in a list.
I using AutoCAD 2006.

Any help would be appreciated.  :-)

ronjonp

  • Needs a day job
  • Posts: 7529
Re: image command not working from lisp
« Reply #1 on: August 29, 2007, 03:35:43 PM »
I tried it here and it worked.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: image command not working from lisp
« Reply #2 on: August 29, 2007, 03:45:50 PM »
Worked for me too.
What is returned when you enter this at the command line?
Code: [Select]
(findfile "C:/Steves_Tiffs/somefilename.tiff")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: image command not working from lisp
« Reply #3 on: August 29, 2007, 03:46:45 PM »
OK, the tiff should be tif :-o
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Cawaugh

  • Guest
Re: image command not working from lisp
« Reply #4 on: August 29, 2007, 09:43:11 PM »
OK, the tiff should be tif :-o

The file name in windows is marked .tiff. Anyway, for some reason it does find the file in a "find" but it still cannot recognize the "image" command from lisp.

Time to let it go and try tomorrow.

Thanks!

Strucmad

  • Guest
Re: image command not working from lisp
« Reply #5 on: August 29, 2007, 09:58:24 PM »
Someone else had this problem, .tif file & Acad2006 said the error was 'not supported file type' he had to resave the .tif file as a .gif
I guess the question is - Can you attach this .tif file manually, if not then problem with .tif, if yes then problem with Lisp?

sorry I couldn't be more help :-)

Strucmad

  • Guest
Re: image command not working from lisp
« Reply #6 on: August 29, 2007, 10:02:23 PM »
And yes I'm aware that .tif & .tiff are supposed to be supported :-D

Cawaugh

  • Guest
Re: image command not working from lisp
« Reply #7 on: August 30, 2007, 07:14:06 AM »
The goofy thing is, it works just fine with the tiff's I have IF I manually enter each command.
If I try it in a script or in lisp, no go. It's almost as if I need to first initialize "Raster" then I can run my program.
Maybe something will popup today. Thanks!

Guest

  • Guest
Re: image command not working from lisp
« Reply #8 on: August 30, 2007, 08:33:00 AM »
Maybe someone can explain why I can type in the commands in the code below but when I try to run the code,
it tells me that it cannot fine command image.

Close AutoCAD and restart??!?

Cawaugh

  • Guest
Re: image command not working from lisp
« Reply #9 on: August 30, 2007, 09:22:31 AM »
Close AutoCAD and restart??!?
[/quote]

I'm afraid that doesn't help. I am trying to run a batch of dwgs and adding tif's to them.
When the "image" or "-image" command is run from the code in the original post, it gives me
the error "Command: -image Unknown command "-IMAGE".  Press F1 for help."
But if I type it at the sommad line, it works.
Command: -image
?/Detach/Path/Reload/Unload/<Attach>:

Why would there be a difference?
Frustrating it is! :|

Guest

  • Guest
Re: image command not working from lisp
« Reply #10 on: August 30, 2007, 09:27:38 AM »
What about setting FILEDIA to 0 and trying IMAGEATTACH?  Does that work?

Disregard that.  Looks like the dialog box ALWAYS pops up when using IMAGEATTACH; even when filedia and cmddia are set to 0.


Just a shot in the dark, but what if you try _.-image instead of just -image?
« Last Edit: August 30, 2007, 09:35:04 AM by Matt W »

Cawaugh

  • Guest
Re: image command not working from lisp
« Reply #11 on: August 30, 2007, 02:50:43 PM »
Same result. I'm going to check whether I need to initialize Raster fisrt before running the command.
It didn't seem to matter when I did it manually but I'm going to search it out anyway.

Later!

Guest

  • Guest
Re: image command not working from lisp
« Reply #12 on: August 30, 2007, 02:51:21 PM »
Worst case scenario?? - REPAIR

Cawaugh

  • Guest
Re: image command not working from lisp
« Reply #13 on: August 12, 2008, 10:01:08 AM »
 :-DI ended up figuring it out. We had the image command undefined and redefined to run another program.
Just for my situation, I redefined it again so I could run what I need and set it back to the previous setting before closing. Just wanted to close this out with a solution. Thanks everyone! :-)

ronjonp

  • Needs a day job
  • Posts: 7529
Re: image command not working from lisp
« Reply #14 on: August 12, 2008, 10:12:30 AM »
This would have fixed it then  :) .-image

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC