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

far ripartre un lisp

  • Thread starter Thread starter canotta
  • Start date Start date

canotta

Guest
Good evening, everyone!
I have a lsp at school, which I found on the internet... but every time I have to go to call him back... it would be very convenient if at the end of all operations, a thing like that is required by the program, do you want to start the program yes or no?
do you know how to create, that is to add this function? or if you know some example that already uses this function, ... that I have searched on the net, but, no outcome:(
thanks in advance
 
to always have at your disposal the program you have different possibilities, I place you the simplest one, add the file to the content of the start group of the appload command.
 
Hi, gp!
the command _appload 'I used, and I had also added the command to a "paletta" autocad, where I created an icon with ps;) and every time I wanted to use that lsp I clicked it.... then I realized that it would be more convenient to integrate in the lsp a function that will restart from the beginning all the process or simply stop it .... but if you can do something... we take an example; if I have to insert a text as in the case of the esp in question that at the end "print" a value to be inserted on the autocad design.
now expanding the thing but keeping in practice the same function, that if I say yes, we imagine that the lsp inserts a text with "blue home" and if I say no inserts a text with "red house" ... then to try to restart the program I will "work behind me", but it seems to me that this function is quite similar, and do a little "" from base"", someone can put it to code? I looked at numerous tutorials and shot for the network but nothing similar to this function :(
good evening to all!! and thank you in advance for availability :)
 
this is an example, to restart the lisp just a sending
Code:
(defun c:prova ( / type_casa txt)
(initget "b r g")
(setq type_casa (getkword "\ninserire il tipo di casa: [Blu/Rossa/Gialla] : ")
(cond)
(equal type_house "b") (setq txt "blue house") )
(equal type_house "r") (setq txt "red house") )
(equal type_house "g") (setq txt "yellow house") )
)
(princ "\npoint of insertion of text")
(command "_-text" breaks "" txt )
(princ)
)
this other example repeats the request until you press forward or exc
Code:
(defun c:prova1 ( / type_casa txt)
(sing)
(progn)
(initget "b r g")
(setq type_casa (getkword "\ninserire il tipo di casa: [Blu/Rossa/Gialla] : ")
(cond)
(equal type_house "b") (setq txt "blue house") )
(equal type_house "r") (setq txt "red house") )
(equal type_house "g") (setq txt "yellow house") )
)
(if type_house
(progn)
(princ "\npoint of insertion of text")
(command "_-text" breaks "" txt )
?
)
nil
)
)
)
(princ)
)
 

Forum statistics

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

Members online

No members online now.
Back
Top