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

create custom buttons for running lisp commands

  • Thread starter Thread starter Pinzy
  • Start date Start date

Pinzy

Guest
buongiorno,

potreste aiutarmi sono bloccato su una possibile cavolata, praticamente io avrei 3 scenari lisp, che eseguono operazioni su i layer, è possibile creare in cad 3 bottoni che mi caricano questi 3 scenari?

o devo perforza crearmi una grafica all'interno del lisp, di sequito il codice di uno dei 3 file.

;creazione lista dei layer
;

(setq layerlist nil)



(setq indice "1")
(setq currentlayer (cdr (assoc 2 (tblnext "layer" t))))
(command "_layer" "_t" currentlayer "")
(command "_layer" "r" currentlayer "")


(setq layerlist (append layerlist (list currentlayer)))
(while (/= currentlayer nil)
(setq currentlayer (cdr (assoc 2 (tblnext "layer"))))
(if
(and
(/= currentlayer nil)
(or
(= (substr currentlayer 1 1) "0")
(= (substr currentlayer 1 1) "1")
(= (substr currentlayer 1 1) "2")
(= (substr currentlayer 1 1) "3")
(= (substr currentlayer 1 1) "4")
(= (substr currentlayer 1 1) "5")
(= (substr currentlayer 1 1) "6")
(= (substr currentlayer 1 1) "7")
(= (substr currentlayer 1 1) "8")
(= (substr currentlayer 1 1) "9")
)
)
(progn
(setq layerlist (append layerlist (list currentlayer)))
(command "_layer" "_f" currentlayer "")
)
)
)
(setq len (length layerlist))
(command "_layer" "_t" indice "")
(command "_layer" "r" indice "")

(setq indicemin (nth 1 layerlist))
(setq indicemax (last layerlist))
 

Forum statistics

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

Members online

No members online now.
Back
Top