liuhaixin88 Posted March 10, 2014 Posted March 10, 2014 I find a lisp to do this ,but,not found. Excuse me, would you give me a hand?thanks! Quote
ReMark Posted March 10, 2014 Posted March 10, 2014 Reduce the weight? Do you mean the file size? Quote
Tharwat Posted March 10, 2014 Posted March 10, 2014 I find a lisp to do this ,but,not found. How you find and not found !!! Quote
liuhaixin88 Posted March 10, 2014 Author Posted March 10, 2014 Reduce the weight? Do you mean the file size? Thanks Remark ,I mean file size. Quote
liuhaixin88 Posted March 10, 2014 Author Posted March 10, 2014 How you find and not found !!! Tharwat ,please help me! Quote
Snownut Posted March 10, 2014 Posted March 10, 2014 There are many reasons for the file size to be large, blocks, dictionaries etc. Run the purge command 3-times in a row, see what that does. (multiple times needed to get to nested blocks) There are also many threads here and other sites addressing this issue. Please conduct a thorough search. Quote
ReMark Posted March 10, 2014 Posted March 10, 2014 The commands I would run would be... Overkill -Purge > Regapps -Purge > All Audit > Fix errors? > Yes Zoom > Extents Save Repeat the sequence once more. Quote
liuhaixin88 Posted March 10, 2014 Author Posted March 10, 2014 The commands I would run would be... Overkill -Purge > Regapps -Purge > All Audit > Fix errors? > Yes Zoom > Extents Save Repeat the sequence once more. Thanks remark,There is another method: use WBLOCK,Many people use. Quote
liuhaixin88 Posted March 11, 2014 Author Posted March 11, 2014 This useful? (defun DwgWblock (dwgfileLst / ACADAPP BACKUPFILE BASENAME DOCOBJ DWGNAME FILEPATH INDEX NEWSET SSETS ) (setq AcadApp (vlax-get-acad-object)) (repeat (setq Index (length dwgfileLst)) (setq DwgName (nth (setq Index (1- Index)) dwgfileLst)) (setq BaseName (vl-filename-base DwgName) filepath (vl-filename-directory DwgName) ;;dxfFile (vl-string-subst ".dxf" ".dwg" DwgName) BackupFile (strcat (getfullpath filepath) BaseName "_Backup" (vl-filename-extension DwgName) ) ) (if (findfile BackupFile) (deletefile BackupFile) ) (if (vl-file-rename DwgName BackupFile) (progn (setq DocObj (vla-open (vla-get-documents AcadApp) BackupFile) ) (setq ssets (vla-get-selectionsets DocObj)) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-item (list ssets "$$Set")) ) (setq newSet (vla-add ssets "$$Set")) (progn (vla-delete (vla-item ssets "$$Set")) (setq newSet (vla-add ssets "$$Set")) ) ) ;;select all objects in the drawing (vla-Select newSet acSelectionSetAll) (vla-WBlock DocObj DwgName newSet) (vla-close DocObj :vlax-false) (deletefile BackupFile) ) ) ) (if DocObj (vlax-release-object DocObj) ) (if AcadApp (vlax-release-object AcadApp) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun DwgWblock1 (HasOpenFiles / *ACAD* *DOCS* DWGNAME N) (setq *ACAD* (vlax-get-acad-object)) (setq HasOpenFiles (mapcar 'strcase HasOpenFiles)) (vlax-for item (vla-get-Documents *ACAD*) (if (member (strcase (vlax-get-property item 'FullName)) HasOpenFiles ) (vla-close item :vlax-false) ) ) (DwgWblock HasOpenFiles) (setq *DOCS* (vla-get-documents *ACAD*)) (repeat (setq n (length HasOpenFiles)) (setq DwgName (nth (setq n (1- n)) HasOpenFiles)) (vla-open *DOCS* DwgName) ) ) Quote
edwinprakoso Posted March 14, 2014 Posted March 14, 2014 If you use AutoCAD 2012 or later, you can try Drawing Purge: https://apps.exchange.autodesk.com/ACD/en/Detail/Index?id=appstore.exchange.autodesk.com%3adrawingpurge_windows32and64%3aen Quote
samifox Posted January 5, 2023 Posted January 5, 2023 https://apps.autodesk.com/ACD/en/Detail/Index?id=7200145281409043954&appLang=en&os=Win64https://apps.autodesk.com/ACD/en/Detail/Index?id=7200145281409043954&appLang=en&os=Win64 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.