Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Mentor
Moshe-A
Posts: 827
Registered: ‎09-14-2003
Message 11 of 20 (158 Views)

Re: export behaves odd in lisp

09-25-2012 12:16 PM in reply to: jmaeding

OK i see the problem but

just wonder if (ssget) solved it why not use it?

Distinguished Contributor
jmaeding
Posts: 1,046
Registered: ‎12-27-2006
Message 12 of 20 (153 Views)

Re: export behaves odd in lisp

09-25-2012 01:00 PM in reply to: Moshe-A

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!

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Distinguished Mentor
Moshe-A
Posts: 827
Registered: ‎09-14-2003
Message 13 of 20 (149 Views)

Re: export behaves odd in lisp

09-25-2012 01:08 PM in reply to: jmaeding

what is the error? send a picture

for me it runs clean

 

Distinguished Contributor
jmaeding
Posts: 1,046
Registered: ‎12-27-2006
Message 14 of 20 (140 Views)

Re: export behaves odd in lisp

09-25-2012 03:02 PM in reply to: Moshe-A

I get this:

 

Command: ttt
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.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Distinguished Mentor
Moshe-A
Posts: 827
Registered: ‎09-14-2003
Message 15 of 20 (130 Views)

Re: export behaves odd in lisp

09-25-2012 10:59 PM in reply to: jmaeding

this error means that you got an extra enter

 

 

 

 

 

Distinguished Contributor
jmaeding
Posts: 1,046
Registered: ‎12-27-2006
Message 16 of 20 (120 Views)

Re: export behaves odd in lisp

09-26-2012 07:35 AM in reply to: Moshe-A

I agree, and worry a bit about what that might do in certain situations.

It was your extra enter though :smileyhappy:

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.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Distinguished Mentor
Moshe-A
Posts: 827
Registered: ‎09-14-2003
Message 17 of 20 (114 Views)

Re: export behaves odd in lisp

09-26-2012 08:33 AM in reply to: jmaeding

 

OK,

 

i removed the extra enter, does it's works now?

 

moshe

 

 

(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)
)

 

Distinguished Contributor
jmaeding
Posts: 1,046
Registered: ‎12-27-2006
Message 18 of 20 (108 Views)

Re: export behaves odd in lisp

09-26-2012 09:36 AM in reply to: Moshe-A

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.

Thanks again.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Distinguished Mentor
Moshe-A
Posts: 827
Registered: ‎09-14-2003
Message 19 of 20 (104 Views)

Re: export behaves odd in lisp

09-26-2012 10:02 AM in reply to: jmaeding

Hallelujah!

 

Hallelujah!

 

Hallelujah!

 

:smileyvery-happy:

 

:smileylol:

 

:smileyhappy:

 

 

Distinguished Contributor
jmaeding
Posts: 1,046
Registered: ‎12-27-2006
Message 20 of 20 (98 Views)

Re: export behaves odd in lisp

09-26-2012 10:59 AM in reply to: Moshe-A

I posted the WTIT.lsp in a new thread, if you want to see the results of our labor.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.