jo974 Posté(e) le 7 janvier 2008 Posté(e) le 7 janvier 2008 hello,j'ai un fichier de façades de bâtiment de 16Mo.Ce fichier doit etre une exportation d'archicad ( mais suis pas sûr).Je b'arive pas à lui donner une taille normale (2-3 Mo)Je dois l envoyer par mail.J ai essayé de supprimer les hachures, de purger ... rien n y fait (au contraire, la taille augmente même)! help !
(gile) Posté(e) le 8 janvier 2008 Posté(e) le 8 janvier 2008 Salut, Peut-être une réponse ici Gilles Chanteau - gileCAD - GitHub Développements sur mesure pour AutoCAD
lesourd2 Posté(e) le 8 janvier 2008 Posté(e) le 8 janvier 2008 Salut Ou alors peut-etre là : Si certains de vos dessins grossissent à vue d'œil et/ou sont fortement ralentis, ils soufrent peut-être d'un dysfonctionnement lié aux listes d'échelles sur AutoCad 2008. Un coup d'œil dans la liste des échelles peut permettre de s'en assurer rapidement. Problèmes rencontrés : • La liste des échelles personnalisées et réinitialisées peut augmenter rapidement, voire devenir monstrueuse en liaison avec les objets annotatifs d'AutoCAD 2008!• Le dessin peut s'en trouver grossi et ralenti.• Le copier/coller, les fonctions de Xref ou Wbloc rapatrient dans les dessins cibles les échelles du dessin source! Solutions : • Charger et Exécuter le Service Pack 1 adapté à votre version d'AutoCAD 2008. De nombreux problèmes sont ainsi résolus (dont celui évoqué, lié aux listes d'échelles)Il reste cependant à traiter les dessins déjà "pollués" par les échelles "indésirables". Pour un dessin déjà « buggé » (très grand nombre d'échelles) :• Lancer la commande modiflistechelle ou Menu : Format puis Liste d'échelles... et utiliser la fonction supprimer Pour un dessin qui contient tellement d'échelles que cette commande Modiflistechelle n'est plus accessible :• Télécharger et lancer le programme lisp de nettoyage automatique de la liste d'échelle Je te joint ici un LISP qui automatise la suppression des échelles en grand nombre .ScaleListDel.lsp ;;;permet de supprimmer une tres grande liste d'echelles ;;;commande:SCALELISTDELALL ;;; ========================================================================== ;;; File: ScaleListDel.lsp ;;; Purpose: Scale list deletion and management for AutoCAD 2008 ;;; Author: Steve Johnson ;;; Date: 13 August 2007 ;;; Version: 0.7 ;;; Copyright: (c) 2007 cad nauseam (www.cadnauseam.com) ;;; May be distributed and used freely provided this header is retained in full ;;; -------------------------------------------------------------------------- ;;; Disclaimer: ;;; This code is supplied as-is and with no warranty whatsoever. ;;; Destruction of annotative objects WILL result from incorrect use. ;;; Use at own risk. No responsibility accepted. Read all notes before use. ;;; -------------------------------------------------------------------------- ;;; Commands: ;;; SCALELISTDEL ;;; Deletes unused scales except 1:1 using a user-provided wildcard. ;;; SCALELISTDELALL ;;; Deletes all unused scales except 1:1. ;;; SCALELISTDELINCH ;;; Deletes all unused scales that contain the inch " character. ;;; SCALELISTDELXREF ;;; Deletes all unused scales that contain the "_XREF" string. ;;; SCALELISTDEL_ ;;; Deletes all unused scales that contain the "_" character. ;;; SCALELISTDELINCHXREF ;;; Deletes all unused scales that contain either the inch " character or ;;; the "_XREF" string. ;;; SCALELISTDELINCH_ ;;; Deletes all unused scales that contain either the inch " or "_" ;;; characters. ;;; SCALELISTMETRIC ;;; Deletes all existing unused scales except 1:1 and sets up metric scales. ;;; SCALELISTMETRICTEMPLATE ;;; Deletes all existing scales and sets up metric scales. For use only in ;;; setting up scales in templates and pre-2008 drawings. ;;; WARNING: potentially destructive to annotative objects! ;;; SCALELISTINCH ;;; Deletes all existing unused scales except 1:1 and sets up inch-based ;;; scales. ;;; SCALELISTINCHTEMPLATE ;;; Deletes all existing scales and sets up inch-based scales. For use ;;; only in setting up scales in templates and pre-2008 drawings. ;;; WARNING: potentially destructive to annotative objects! ;;; -------------------------------------------------------------------------- ;;; Functions: ;;; (scaledel_all_unsafe) ;;; Deletes all scales in the current drawing, including 1:1 and scales in ;;; use. ;;; WARNING: potentially destructive to annotative objects! ;;; (scaledel_wcard_unsafe WCARD-OR-LIST) ;;; If WCARD-OR-LIST is a wildcard string, deletes scales that match that ;;; wildcard, excluding 1:1 but including scales in use. ;;; If WCARD-OR-LIST is a list of scale names, deletes those scales, ;;; including 1:1 (if listed) and scales in use. ;;; WARNING: potentially destructive to annotative objects! ;;; (scaledel_long_xref LONG-SCALE-LIST) ;;; Cleans up those scales that are too long to delete using the command-line ;;; (i.e. over 132 characters). These are usually only those created by the ;;; AutoCAD 2008 pre-SP1 bug that created _XREF_XREF_XREF scales, and this ;;; is checked before deletion. ;;; (scaledel_warning) ;;; Issues a warning and asks user to enter Yes before continuing. ;;; (scaledel_get_scalelist) ;;; Returns a list of scales in the drawing. ;;; (scaledel_all) ;;; Deletes all scales other than 1:1 and scales in use. ;;; (scaledel_reset) ;;; Performs a -SCALELIST Reset command. ;;; (scaledel_smart_reset) ;;; Performs a -SCALELIST Reset command if it is likely to reduce the number ;;; of scales in the list, prior to setting things up. ;;; (scaledel_wcard WCARD) ;;; Deletes scales that match WCARD, excluding 1:1 and scales in use. ;;; (scaledel_create_scales SCALES) ;;; Creates a set of scales defined in list SCALES. ;;; (scaledel_create_metric) ;;; Creates a set of metric scales: see *** in code to adjust list. ;;; (scaledel_create_inch) ;;; Creates a set of inch scales: see *** in code to adjust list. ;;; -------------------------------------------------------------------------- ;;; Notes: ;;; Other than the SCALELIST*TEMPLATE commands, the commands will not delete ;;; the 1:1 scale, even if it is not in use. This is because if the scale list ;;; is completely cleared, AutoCAD 2008 will automatically recreate it using ;;; its hardwired list when the user picks the "Custom..." item that ;;; remains in the list. Leaving in the 1:1 scale prevents this from happening. ;;; The (scaledel_*_unsafe) functions can be used to delete all scales, ;;; including 1:1 and those in use, if you really need to do so. ;;; -------------------------------------------------------------------------- ;;; Later AutoCAD releases: ;;; As AutoCAD 2008's annotative scaling feature needs work, it is quite likely ;;; that future releases of AutoCAD will do things differently. This may result ;;; in this software failing to work correctly, or working with unintended ;;; results. Check carefully before using this software in 2009 and later. ;;; -------------------------------------------------------------------------- ;;; WARNING: ;;; Any function that uses the (scaledel_*_unsafe) functions may be DESTRUCTIVE ;;; to any annotative objects in the drawing, because they allow the deletion ;;; of scales that are in use. ;;; ========================================================================== (if (>= (atof (substr (getvar "ACADVER") 1 4)) 17.1) (progn ; Only define these functions if they will work (ie. 2008 or later) (prompt "\nLoading ScaleListDel.lsp Version 0.7... ") ;;; -------------------------------------------------------------------------- ;;; Commands (defun C:SCALELISTDEL (/ wcard) (setq wcard (getstring "\nEnter scale name(s) to delete: ")) (if (/= wcard "") (scaledel_long_xref (scaledel_wcard wcard)) ) (princ) ) ; End C:SCALELISTDEL (defun C:SCALELISTDELALL () (scaledel_all) (princ) ) ; End C:SCALELISTDELXREF (defun C:SCALELISTDELXREF () (scaledel_long_xref (scaledel_wcard "*_XREF")) (princ) ) ; End C:SCALELISTDELXREF (defun C:SCALELISTDEL_ () (scaledel_long_xref (scaledel_wcard "*_*")) (princ) ) ; End C:SCALELISTDEL_ (defun C:SCALELISTDELINCH () (scaledel_long_xref (scaledel_wcard "*\"*")) (princ) ) ; End C:SCALELISTDELINCH (defun C:SCALELISTDELINCHXREF () (scaledel_long_xref (scaledel_wcard "*\"*,*_XREF")) (princ) ) ; End C:SCALELISTDELINCHXREF (defun C:SCALELISTDELINCH_ () (scaledel_long_xref (scaledel_wcard "*\"*,*_*")) (princ) ) ; End C:SCALELISTDELINCHXREF (defun C:SCALELISTMETRIC () (scaledel_smart_reset) (prompt "\nDeleting existing unused scales...") (scaledel_long_xref (scaledel_wcard "*")) (prompt "\nCreating metric scales...") (scaledel_create_metric) (princ) ) ; End C:SCALELISTMETRIC (defun C:SCALELISTMETRICTEMPLATE () (if (= (scaledel_warning) "Yes") (progn (scaledel_smart_reset) (prompt "\nDeleting all existing scales...") (scaledel_all_unsafe) (prompt "\nCreating metric scales...") (scaledel_create_metric) ) ) (princ) ) ; End C:SCALELISTMETRICTEMPLATE (defun C:SCALELISTINCH () (scaledel_smart_reset) (prompt "\nDeleting existing unused scales...") (scaledel_wcard "*") (prompt "\nCreating inch scales...") (scaledel_create_inch) (princ) ) ; End C:SCALELISTINCH (defun C:SCALELISTINCHTEMPLATE () (if (= (scaledel_warning) "Yes") (progn (scaledel_smart_reset) (prompt "\nDeleting all existing scales...") (scaledel_all_unsafe) (prompt "\nCreating inch scales...") (scaledel_create_inch) ) ) (princ) ) ; End C:SCALELISTINCHTEMPLATE ;;; -------------------------------------------------------------------------- ;;; Functions (defun scaledel_all_unsafe (/ scale-en-list) (foreach item (dictsearch (namedobjdict) "ACAD_SCALELIST") (if (= 350 (car item)) (setq scale-en-list (cons (cdr item) scale-en-list)) ) ) (foreach item scale-en-list (entdel item) ) ) ; End scaledel_all_unsafe (defun scaledel_wcard_unsafe (WCARD-OR-LIST / scale-list scale) (foreach item (dictsearch (namedobjdict) "ACAD_SCALELIST") (if (= 350 (car item)) (setq scale-list (cons (cons (strcase (cdr (assoc 300 (entget (cdr item))))) (cdr item)) scale-list ) ) ) ) (if (= (type WCARD-OR-LIST) 'STR) (foreach item scale-list (if (and (wcmatch (car item) (strcase WCARD)) (/= (car item) "1:1") ) (entdel (cdr item)) ) ) (foreach item WCARD-OR-LIST (if (setq scale (assoc (strcase item) scale-list)) (entdel (cdr scale)) ) ) ) ) ; End scaledel_wcard_unsafe (defun scaledel_long_xref (LONG-SCALE-LIST / scale-list) (foreach scale LONG-SCALE-LIST (if (wcmatch (strcase scale) "*_XREF_XREF_XREF*") (setq scale-list (cons scale scale-list)) ) ) (if scale-list (progn (prompt "\nDeleting the following long _XREF scale(s):") (foreach scale scale-list (prompt (strcat "\n " scale)) ) (scaledel_wcard_unsafe scale-list) ) ) ) ; End scaledel_long_xref (defun scaledel_warning () (initget "Yes No") (getkword (strcat "\nThis command will first destroy all existing scales including those in use." "\nAre you sure you want to do this? [Yes/No] : " ) ) ) ; End scaledel_warning (defun scaledel_get_scalelist (/ scale-list) (foreach item (dictsearch (namedobjdict) "ACAD_SCALELIST") (if (= 350 (car item)) (setq scale-list (cons (strcase (cdr (assoc 300 (entget (cdr item))))) scale-list) ) ) ) scale-list ) ; End scaledel_get_scalelist (defun scaledel_all () (scaledel_smart_reset) (scaledel_long_xref (scaledel_wcard "*")) ) ; End scaledel_all (defun scaledel_reset (/ cmdecho) (setq cmdecho (getvar "CMDECHO")) (setvar "CMDECHO" 0) (command "_.-SCALELISTEDIT" "_R" "_Y" "_E") (setvar "CMDECHO" cmdecho) ) ; End scaledel_reset (defun scaledel_smart_reset () (if (> (length (scaledel_get_scalelist)) 40) (scaledel_reset) ) ) ; End scaledel_smart_reset (defun scaledel_wcard (WCARD / scale-list cmdecho long-scale-list) (foreach scale (scaledel_get_scalelist) (if (and (wcmatch (strcase scale) (strcase WCARD)) (/= scale "1:1") ) (setq scale-list (cons scale scale-list)) ) ) (if scale-list (progn (setq cmdecho (getvar "CMDECHO")) (setvar "CMDECHO" 0) (command "_.-SCALELISTEDIT") (foreach item scale-list (if (<= (strlen item) 132) (command "_D" item) ; Attempt to delete scale (setq long-scale-list (cons item long-scale-list)) ) ) (command "_E") (setvar "CMDECHO" cmdecho) ) ) long-scale-list ; Returns list of scales too long to delete ) ; End scaledel_wcard (defun scaledel_create_scales (SCALES / scale-list-all cmdecho) (setq scale-list-all (scaledel_get_scalelist) cmdecho (getvar "CMDECHO") ) (setvar "CMDECHO" 0) (command "_.-SCALELISTEDIT") (foreach scale SCALES (if (not (member (strcase (car scale)) scale-list-all)) (command "_A" (car scale) (cadr scale)) ) ) (command "_E") (setvar "CMDECHO" cmdecho) ) ; End scaledel_create_scales ;;; -------------------------------------------------------------------------- ;; *** Note: several uncommon scales have been commented out. ;; Delete the leading semi-colon to make a scale active. ;; You can comment out an unwanted scale by placing a semi-colon at ;; the start of its line. (defun scaledel_create_metric () (scaledel_create_scales '( ; ("10:1" "10:1") ; ("5:1" "5:1") ; ("2:1" "2:1") ("1:1" "1:1") ("1:2" "1:2") ; ("1:2.5" "1:2.5") ("1:5" "1:5") ("1:10" "1:10") ("1:20" "1:20") ; ("1:25" "1:25") ("1:50" "1:50") ("1:100" "1:100") ("1:200" "1:200") ; ("1:250" "1:250") ("1:500" "1:500") ("1:1000" "1:1000") ("1:2000" "1:2000") ; ("1:2500" "1:2500") ("1:5000" "1:5000") ; ("1:10000" "1:10000") ; ("1:20000" "1:20000") ; ("1:25000" "1:25000") ; ("1:50000" "1:50000") ; ("1:100000" "1:100000") ; ("1:200000" "1:200000") ; ("1:250000" "1:250000") ; ("1:500000" "1:500000") ("1:1 m" "1000:1") ("1:2 m" "1000:2") ; ("1:2.5 m" "1000:2.5") ("1:5 m" "1000:5") ("1:10 m" "1000:10") ("1:20 m" "1000:20") ; ("1:25 m" "1000:25") ("1:50 m" "1000:50") ("1:100 m" "1000:100") ("1:200 m" "1000:200") ; ("1:250 m" "1000:250") ("1:500 m" "1000:500") ("1:1000 m" "1000:1000") ("1:2000 m" "1000:2000") ; ("1:2500 m" "1000:2500") ("1:5000 m" "1000:5000") ("1:10000 m" "1000:10000") ("1:20000 m" "1000:20000") ; ("1:25000 m" "1000:25000") ("1:50000 m" "1000:50000") ; ("1:100000 m" "1000:100000") ; ("1:200000 m" "1000:200000") ; ("1:250000 m" "1000:250000") ; ("1:500000 m" "1000:500000") ) ) ) ; End scaledel_create_metric ;;; -------------------------------------------------------------------------- ;; *** Note: several uncommon scales have been commented out. ;; Delete the leading semi-colon to make a scale active. ;; You can comment out an unwanted scale by placing a semi-colon at ;; the start of its line. (defun scaledel_create_inch () (scaledel_create_scales '( ; ("8:1" "8:1") ; ("4:1" "4:1") ; ("2:1" "2:1") ("1:1" "1:1") ("1/32\" = 1'-0\"" "0.03125:12") ("1/16\" = 1'-0\"" "0.0625:12") ("3/32\" = 1'-0\"" "0.09375:12") ("1/8\" = 1'-0\"" "0.125:12") ("3/16\" = 1'-0\"" "0.1875:12") ("1/4\" = 1'-0\"" "0.25:12") ("3/8\" = 1'-0\"" "0.375:12") ("1/2\" = 1'-0\"" "0.5:12") ("3/4\" = 1'-0\"" "0.75:12") ("1\" = 1'-0\"" "1:12") ("1-1/2\" = 1'-0\"" "1.5:12") ("3\" = 1'-0\"" "3:12") ("6\" = 1'-0\"" "6:12") ("1\" = 10'-0\"" "1:120") ("1\" = 20'-0\"" "1:240") ("1\" = 30'-0\"" "1:360") ("1\" = 40'-0\"" "1:480") ("1\" = 50'-0\"" "1:600") ("1\" = 60'-0\"" "1:720") ("1\" = 100'-0\"" "1:1200") ; ("1\" = 250'-0\"" "1:3000") ; ("1\" = 500'-0\"" "1:6000") ; ("1\" = 1000'-0\"" "1:12000") ; ("1\" = 5280'-0\"" "1:63360") ; ("1\" = 12000'-0\"" "1:144000") ; ("1\" = 24000'-0\"" "1:288000") ; ("1\" = 48000'-0\"" "1:576000") ; ("1\" = 50000'-0\"" "1:600000") ; ("1\" = 52800'-0\"" "1:633600") ) ) ) ; End scaledel_create_inch (prompt (strcat "SCALELISTDEL SCALELISTDELALL SCALELISTDELINCH SCALELISTDELXREF " "SCALELISTDEL_ SCALELISTDELINCHXREF SCALELISTDELINCH_ SCALELISTMETRIC " "SCALELISTMETRICTEMPLATE SCALELISTINCH SCALELISTINCHTEMPLATE " "commands loaded.\n" ) ) ) ; End progn to test for AutoCAD release (prompt "\nRequires AutoCAD 2008 or above.") ) (princ) ;;; ========================================================================== ;;; End of file ScaleListDel.lsp ;;; ========================================================================== PS : Personnellement je ne l'ai pas testé ( pas v.)2008. @+
Bred Posté(e) le 8 janvier 2008 Posté(e) le 8 janvier 2008 Salut,Je te joint ici un LISP qui automatise la suppression des échelles en grand nombre .Hu !... je ne l'ai pas testé mais ça me parait bien long !....j'avais réalisé quelque chose pour ça ici ....Et il te permet de te créer ta propre liste... Si vous êtes persuadés de tout savoir sur un sujet, c''est que vous en ignorez quelque chose...
jo974 Posté(e) le 7 février 2009 Auteur Posté(e) le 7 février 2009 ok merci,mais je vous avoue que je ne sais pas quoi faire de ce long LISP.Faut que je le copie et que le le colle dans l 'editeur Visual LISP, puis que je l enregistre ou bien ? Tiens par la meme occasion je viens de copier un logo (d'un fichier word) que j'ai collé dans mon dessin autocad qu'il a collé en objet OLE. J'ai ensuite utilisé ce logo dans 4 cartouches (4 présentations). Maintenant mon fichier fait 4 Mo de plus qu'avant. (????) [Edité le 7/2/2009 par jo974]
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