Bonjour, je fais des petites routines lisp depuis quelques temps deja, mais "à l'ancienne" et je vois bien que je vais pas tarder à etre déborder car je ne comprends pas grand chose au (VL truc. Est ce que quelqu'un pourrait me transcrire ce petit lisp ci-dessous afin que je commence à mettre les mains dedans. D'avance merci.
;; ========================= ISO: creer une vue iso d'un plan =================================;;
;; Iso (Eric MARCEL @ TECKNING)
;; Création d'une vue iso à partir des éléments sélectionnés.
(defun c:ISO (/ angi nombloc);;entites pdb ang angi nombloc pdi )
(princ "\n VUE EN PLAN ----> VUE ISO")
(setvar "cmdecho" 0)
(if a (setq a a) (setq a 0))
(if b (setq b B) (setq b 0))
(if c (setq c c) (setq c 0))
(if d (setq d d) (setq d 0))
(command "-purger" "b" "DVN" "N")
(setq entites (ssget))
(setq pdb (getpoint "\nPoint d'insertion: "))
(setq pdi(strcat(rtos(car pdb)) "," (rtos(cadr pdb))))
(setq ang (getstring "\nPoint de vue iso [sO] [NO] [NE] [sE]: "))
(cond
((= ang "SO") (setq angi 45.0 a (1+ a) i a))
((= ang "so") (setq angi 45.0 a (1+ a) i a))
((= ang "NO") (setq angi 135.0 b (1+ B) i B))
((= ang "no") (setq angi 135.0 b (1+ B) i B))
((= ang "NE") (setq angi 225.0 c (1+ c) i c))
((= ang "ne") (setq angi 225.0 c (1+ c) i c))
((= ang "SE") (setq angi 315.0 d (1+ d) i d))
((= ang "se") (setq angi 315.0 d (1+ d) i d))
)
(princ)
(if ( = ang "") (setq ang "SE"
d (1+ d)
i d
angi 315.0 )
)
(command "_copy" entites "" pdi "@")
(command "-bloc" "DVN" pdi entites "")
(command "-inserer" "DVN" pdi "1" "1" angi)
(command "decompos" "D" )
(command "-purger" "b" "DVN" "N")
(command "-bloc" "DVN" pdi "p" "")
(command "-inserer" "DVN" pause "1" "0.5774" "0")
(setq nombloc (strcat "Iso_"(strcat (strcase ang )"-"(itoa i))))
(while (tblsearch "BLOCK" nombloc )
(progn
(setq i (1+ i))
(setq nombloc (strcat "Iso_"(strcat (strcase ang )"-"(itoa i))))
)
()
)
(command "-renommer" "b" "DVN" nombloc)
(prompt (strcat "bloc " nombloc " créé ! © TECKNING"))
(princ)
)
;; =====================================================================================