TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Cawaugh 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. :-)
-
I tried it here and it worked.
-
Worked for me too.
What is returned when you enter this at the command line?
(findfile "C:/Steves_Tiffs/somefilename.tiff")
-
OK, the tiff should be tif :-o
-
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!
-
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 :-)
-
And yes I'm aware that .tif & .tiff are supposed to be supported :-D
-
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!
-
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??!?
-
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! :|
-
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?
-
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!
-
Worst case scenario?? - REPAIR
-
:-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! :-)
-
This would have fixed it then :) .-image
-
Note the Red Dot! .-image
It was hard to see with these old eyes :oops: