• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Distinguished Mentor
    Moshe-A
    Posts: 673
    Registered: ‎09-14-2003

    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?

    Please use plain text.
    Distinguished Contributor
    Posts: 702
    Registered: ‎12-27-2006

    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!

    Please use plain text.
    Distinguished Mentor
    Moshe-A
    Posts: 673
    Registered: ‎09-14-2003

    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

     

    Please use plain text.
    Distinguished Contributor
    Posts: 702
    Registered: ‎12-27-2006

    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.

    Please use plain text.
    Distinguished Mentor
    Moshe-A
    Posts: 673
    Registered: ‎09-14-2003

    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

     

     

     

     

     

    Please use plain text.
    Distinguished Contributor
    Posts: 702
    Registered: ‎12-27-2006

    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.

    Please use plain text.
    Distinguished Mentor
    Moshe-A
    Posts: 673
    Registered: ‎09-14-2003

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

     

    Please use plain text.
    Distinguished Contributor
    Posts: 702
    Registered: ‎12-27-2006

    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.

    Please use plain text.
    Distinguished Mentor
    Moshe-A
    Posts: 673
    Registered: ‎09-14-2003

    Re: export behaves odd in lisp

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

    Hallelujah!

     

    Hallelujah!

     

    Hallelujah!

     

    :smileyvery-happy:

     

    :smileylol:

     

    :smileyhappy:

     

     

    Please use plain text.
    Distinguished Contributor
    Posts: 702
    Registered: ‎12-27-2006

    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.

    Please use plain text.