Message 1 sur 8
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Lien permanent
- Imprimer
- Signaler
Bonjour tous,
Je souhaiterai créer un lisp qui me permette en sélectionnant un texte de le tourner en cliquant 2 points, en ayant activé l'accroche objet proche et qu'il se mette de la couleur "du calque" .
Est ce que quelqu'un pourrait m'aider ? 😃
J'ai ce lisp qui fonctionne sur autocad mais je voudrais qu'il fonctionne sur ZWCAD:
(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!
Résolu ! Accéder à la solution.