PHILPHIL Posté(e) le 25 janvier 2008 Posté(e) le 25 janvier 2008 Bonsoir si comme moi a force de manipuler les cotescopier collerrealignement en copiant vous vous retrouvez a avoir le texte des cotes la tete en bas voici un petit LISp à essayery'a surement des ameliorations qu'il faudrat que j'apporte phil corrections de frappe dans le lisp ; ----------------- ; REVERSE LES COTES ; ----------------- (defun C:REC (/ ANGCOTE CALQCOTE CAV CODEMPLA COM COMPT ENT ENTX LONGCOTE POINT10 POINT11 POINT13 POINT14 STYLECOTE STYLECOTEBASE) (setvar "cmdecho" 0) (setq OSM (getvar "osmode")) (setvar "osmode" 0) (setq CAV (getvar "clayer")) (setq STYLECOTEBASE (getvar "dimstyle")) (prompt "\nCLIQUER SUR LE(S) COTE(S) A MODIFIER :") (setq ENTX NIL) (while (null ENTX) (setq ENTX (ssget '((0 . "DIMENSION"))))) (setq COMPT 0) (setq COM (sslength ENTX)) (while (< COMPT COM) (progn (setq ENT (entget (ssname ENTX COMPT))) (setq NONENT (cdr (assoc -1 ENT)) STYLECOTE (cdr (assoc 3 ENT)) CALQCOTE (cdr (assoc 8 ENT)) POINT10 (trans (cdr (assoc 10 ENT)) 0 1) POINT11 (trans (cdr (assoc 13 ENT)) 0 1) POINT13 (trans (cdr (assoc 13 ENT)) 0 1) POINT14 (trans (cdr (assoc 14 ENT)) 0 1) ANGCOTE (cdr (assoc 50 ENT)) LONGCOTE (cdr (assoc 42 ENT)) CODEMPLA (cdr (assoc 70 ENT)) ASX1 (car (getvar "ucsxdir")) ASX2 (cadr (getvar "ucsxdir")) ) (if (and (= ASX1 1) (= ASX2 0)) (setq ANGSCU 0) ) (if (and (and (< ASX1 1) (> ASX1 0)) (and (< ASX2 1) (> ASX2 0)) ) (setq ANGSCU (atan (/ ASX2 ASX1))) ) (if (and (= ASX1 0) (= ASX2 1)) (setq ANGSCU (/ pi 2)) ) (if (and (and (< ASX1 0) (> ASX1 -1)) (and (< ASX2 1) (> ASX2 0)) ) (setq ANGSCU (- (atan (/ ASX2 ASX1)) pi)) ) (if (and (= ASX1 -1) (= ASX2 0)) (setq ANGSCU (* 2 pi)) ) (if (and (and (< ASX1 0) (> ASX1 -1)) (and (< ASX2 0) (> ASX2 -1)) ) (setq ANGSCU (+ (atan (/ ASX2 ASX1)) pi)) ) (if (and (= ASX1 0) (= ASX2 -1)) (setq ANGSCU (+ pi (/ pi 2))) ) (if (and (and (< ASX1 1) (> ASX1 0)) (and (< ASX2 0) (> ASX2 -1)) ) (setq ANGSCU (atan (/ ASX2 ASX1))) ) (setq ANGCOTEDEGRE (angtos (- ANGCOTE ANGSCU) 0 10)) (command "-calque" "ch" CALQCOTE "") (command "-dimstyle" "R" STYLECOTE) (command "cotlin" POINT13 POINT14 "r" ANGCOTEDEGRE POINT10) (command "effacer" NONENT "") (setq COMPT (1+ COMPT)) ) ) (setvar "osmode" OSM) (setvar "clayer" CAV) (command "-dimstyle" "R" STYLECOTEBASE) (princ) ) [Edité le 30/1/2008 par PHILPHIL] FREELANCE Autodesk Architecture 2025 sous windows 11 64 REVIT 24 pouces vertical + 30 pouces horizontal + 27 pouces horizontal
yusukens82 Posté(e) le 26 janvier 2008 Posté(e) le 26 janvier 2008 Salut PHILPHILj'ai trouvé ton idée génial, on passe souvent du temps a remettre les côtes dans son bon SCU J'ai donc testé ton lisp,Effectivement ça marche, je te signal juste un petit bug, c'est lorsqu'on utilise des COTES ALIGNEE, avec lisp , il bascule en COTE PIVOTEES [Edité le 8/4/2011 par yusukens82]
PHILPHIL Posté(e) le 2 octobre 2013 Auteur Posté(e) le 2 octobre 2013 hello REC .lsp enfin au bout de oups 5 ansj'ai réussis a ce que ca marcheca manquait de precision en fait donc je remet le lisp a disposition pour ceux que ca interesse a+ phil FREELANCE Autodesk Architecture 2025 sous windows 11 64 REVIT 24 pouces vertical + 30 pouces horizontal + 27 pouces horizontal
Messages recommandés
Créer un compte ou se connecter pour commenter
Vous devez être membre afin de pouvoir déposer un commentaire
Créer un compte
Créez un compte sur notre communauté. C’est facile !
Créer un nouveau compteSe connecter
Vous avez déjà un compte ? Connectez-vous ici.
Connectez-vous maintenant