56
259
213
后起之秀
;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ CE PROGRAM EST CONÇU POUR DESSINER ¦¦¦;;¦¦¦ UNE BOITE AUTOUR D'UN MTEXT ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ AUTEUR : CadFrank, Copyright ® 2012 ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ Ce sous-program défini les calques ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;(defun NouveauCalque (/ lay) (if (not (tblsearch "LAYER" "-LU SYMBOLE")) (progn (command "_layer" "_n" "-LU SYMBOLE" "_C" "90" "-LU SYMBOLE" "" "" ) ) ) ;if) ; fin NouveauCalque;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ Ce sous-program défini les ¦¦¦;;¦¦¦ parametres initial ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;(defun Parametreinitial () (setq retour (list (cons "osmode" (getvar 'osmode)) (cons "clayer" (getvar 'clayer)) ) ) (setvar 'OSMODE 0) retour ; la dernière expression est retournée par la fonction); fin parametreinitial;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ Ce sous-program remet les ¦¦¦;;¦¦¦ parametres initial ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;(defun Parametrefin (retour) (foreach p retour (setvar (car p) (cdr p)) ));fin parametrefin;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ Ce sous-program reproduit ¦¦¦;;¦¦¦ une ligne ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;(defun _Line (pt1 pt2) (entmakex (list '(0 . "LINE") '(8 . "-LU SYMBOLE") '(62 . 61) (cons 10 pt1) (cons 11 pt2) ) ) );fin;¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ Ce sous-program reproduit ¦¦¦;;¦¦¦ une polyligne ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦; (defun _Poly (po1 po2 po3 po4 w clr) (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 5) '(70 . 1) '(8 . "-LU SYMBOLE") (cons 10 po1) (cons 10 po2) (cons 10 po3) (cons 10 po4) (cons 62 clr) (cons 43 w) ) ) );¦¦¦ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¦¦¦;;¦¦¦ PROGRAM PRINCIPAL ¦¦¦;;¦¦¦ _______________________________________________________________________ ¦¦¦;(defun c:bca (/ Entt pt ho ve ang ht p1 p2 p3 p4 p5 p6 p7 p8) (vl-load-com) (setq init (Parametreinitial)) (NouveauCalque) (if (and (not (while (progn (setvar 'errno 0) (setq Entt (car (entsel "\n Sélectionner le MultiText désiré : ")) ) (cond