Bonjour à tous,
Alors voilà j'vais un lisp qui fonctionné sur autocad mais ne fonctionne pas sur ZwCad.
Ce lisp me permet en gros de sélectionner un texte, activé l'accroche objet, orienter le texte par 2 points, le déplacer, et passer la couleur dans "du calque".
Est-ce que quelqu'un serait ce qui ne va pas ?
Voici mon lisp:
(Defun C:tz (/ *error*);Define new command line function
;DEBUT TRAPPE ERREUR (SORTIE ESCAPE)
(defun *error* (msg)
(if (not (member msg '("console break" "Function cancelled" "quit / exit abord")))
(princ (strcat "\nError: " msg))
)
(setvar "osmode" oldosmode)
(princ)
)
;FIN TRAPPE ERREUR
(setq oldosmode (getvar "osmode"))
(setq E null)
(while (= E null)
(command "-accrobj" "pro")
(princ "\nSélectionnez un objet TEXTE")
(setq na (acet-ui-single-select '((-4 . "<OR")
(0 . "TEXT")
(-4 . "<AND")
(0 . "POLYLINE")
(-4 . "<NOT")
(-4 . "&")
(70 . 112)
(-4 . "NOT>")
(-4 . "AND>")
(-4 . "OR>")
)
T
);acet-ui-single-select
);setq
(if na
(progn
(Command "changer" na "" pause "" "" pause "")
(command "-accrobj" "")
(command "deplacer" "p" "" "@" pause)
(Command "changer" na "" "p" "co" "ducalque" "")
);progn
);if
(if (not na)
(progn
(setq E "fin")
;(command "-accrobj" "nod,int,ext")
(setvar "osmode" oldosmode)
);progn
);if
(princ)
);while
);Defun
(Defun C:tzx (/ *error*);Define new command line function
;DEBUT TRAPPE ERREUR (SORTIE ESCAPE)
(defun *error* (msg)
(if (not (member msg '("console break" "Function cancelled" "quit / exit abord")))
(princ (strcat "\nError: " msg))
)
(setvar "osmode" oldosmode)
(princ)
)
;FIN TRAPPE ERREUR
(setq oldosmode (getvar "osmode"))
(setq E null)
(while (= E null)
(command "-accrobj" "pro")
(princ "\nSélectionnez un objet TEXTE")
(setq na (acet-ui-single-select '((-4 . "<OR")
(0 . "TEXT")
(-4 . "<AND")
(0 . "POLYLINE")
(-4 . "<NOT")
(-4 . "&")
(70 . 112)
(-4 . "NOT>")
(-4 . "AND>")
(-4 . "OR>")
)
T
);acet-ui-single-select
);setq
(if na
(progn
(command "copier" na "" "@" "@")
(Command "changer" na "" pause "" "" pause "")
(command "-accrobj" "")
(command "deplacer" "p" "" "@" pause)
);progn
);if
(if (not na)
(progn
(setq E "fin")
;(command "-accrobj" "nod,int,ext")
(setvar "osmode" oldosmode)
);progn
);if
(princ)
);while
);Defun
Merci beaucoup pour votre aide. 🙂
Cela m'handicape énormément pour l'instant j'effectue la rotation avec la commande texte rotation de GeogexFR mais c'est fastidieux.
Bonne journée