I would, I am just not sure what its really doing.
Your code exits with an error, though it seems to work.
I will try a couple things first, mainly (command "select" "") to see if I can get it down to one3 case at the export step.
thanks a bunch for your thoughts on this so far!
I get this:
Insertion base Point: Unknown command "TTT". Press F1 for help.
I am not sure why it gives that since TTT is defined. It should have failed on the SS param.
I'll probably just use that as the error seems benign.
I agree, and worry a bit about what that might do in certain situations.
It was your extra enter though
There is some bug going on, as simply adding "oops" after the command messes it up.
It works fine when you type it, just not in the flow of lisp.
i removed the extra enter, does it's works now?
(defun c:ttt (/ fname ss ins) (defun askPoint () (setq ins (getpoint "\nInsertion base Point: ")) ) (setq fname "C:\\TEMP\\JAMES.dwg") (if (setq ss (ssget "i")) (if (askPoint) (command ".export" fname ins ss "" "oops") ); if (if (setq ss (ssget)) (if (askPoint) (command ".export" fname "" ins ss "" "oops") ); if ); if ); if (princ) )
yah, it does. I am sure I tried that before, here is revised test code:
(DEFUN C:TTT ( / SS PICKPT tempdrawing james) (SETQ SS (SSGET "I")) (SETQ PICKPT (getpoint "\nPick Insert Point")) (setq tempdrawing "C:\\TEMP\\tempp.DWG") (command ".export" tempdrawing PICKPT SS "" "OOPS") )
I will have to look back over what I did before, as I must have fooled myself that I tried it.
Maybe the fact that it behaves differently in lisp than on command line tricked me, but it seems its working now.
Start with some of our most frequented solutions to get help installing your software.