• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

launch a lisp from lisp

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
in the code below, the > command < extracted from the windows clipboard, contains the lisp command name to run.
then command = "line" should run the command "line".
what can I write instead of (xxxxxx) to get this?
It doesn't work!
Thank you.
Code:
 (defun panel (/ command)

(runapp "c:\\autocadsupporto\\\libertytre\\\pannelloicone.exe "c:\\\\\autocadsupport\\\\\\\\\pannelloicone.tkn" :vlax-true)
(setq command (getcliptext)

(princ "\n")
(princ "command xxxxxxxxx ")
(princ command)
(princ "\n")

(xxxxxxxxxx)

);
 
Thank you.

but > (command command) < or (command (command)) does not work, the instruction contained in
> command < is not recognized.
I also replaced > command < with > command < to avoid analogies but it does not work.
 
how do you know where to draw the line if you don't give it the start and end points

(setq command "line")
(command command "0,0" "3,8"")
 
It's not the case,
the command I would like to perform is > reference < if on the command bar type > reference < then
> enter < , everything works.
so how should the code be written to work?
Code:
 (defun panel (/ commandx commandy)

(runapp "c:\\autocadsupporto\\\libertytre\\\pannelloicone.exe "c:\\\\\autocadsupport\\\\\\\\\pannelloicone.tkn" :vlax-true)

(setq commandx (getcliptext)

(princ "\n")
(princ "comandox xxxxxxxxx ")
(princ commandx)
(princ "\n")

(setq commandy command)
(comandoy)

);
the execution of this code causes:

command: panel
commandx xxxxxxxxxx reference
; error: wrong function: "referral"

Thank you.
 
the command I would like to perform is > reference < if on the command bar type > reference < then > enter < , everything works.
so how should the code be written to work
but what command is reference? ? ?
a command passed by a lisp (autocad command, not a lisp function) must correspond to the sequence you would introduce from command line.
since the latter says it works with (command commandy ")
 
It is clear that > reference < is a lisp command!
The only way I've tried, right now, where the code works, is this:
Code:
(defun panel (/ commandx)

(runapp "c:\\autocadsupporto\\\libertytre\\\pannelloicone.exe "c:\\\\\autocadsupport\\\\\\\\\pannelloicone.tkn" :vlax-true)
(setq commandx (getcliptext)

(princ "\n")
(princ "comandox xxxxxxxxx ")
(princ commandx)
(princ "\n")

(cond)
((= commandx "reference") (reference))
((= commandx "chargerif") (loadrif))
............ .... .
............ .... .
............ .... .
);

);
but sincerely does not satisfy me!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top