乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: alanjt

file bloat/infection

[复制链接]

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2016-11-30 12:06:52 | 显示全部楼层
...
What I don't understand is how your file is almost a mb smaller. What did you do to the drawing?
...
Just a quick wblock over itself without saving changes  .. I do this to every file I get to get the 'crap' out.
How'd you wblock it out and keep all the contents in the sheet layout?
回复

使用道具 举报

58

主题

3353

帖子

33

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1761
发表于 2016-11-30 13:11:14 | 显示全部楼层
...
What I don't understand is how your file is almost a mb smaller. What did you do to the drawing?
...
Just a quick wblock over itself without saving changes  .. I do this to every file I get to get the 'crap' out.
How'd you wblock it out and keep all the contents in the sheet layout?
  1. (defun c:purgeitfoo (/ c e)
  2.   ;; Ronjonp quick purge 11.30.2016
  3.   ;; Use at your own risk 8-)=
  4.   (if (and (= (getvar 'dwgtitled) 1) (/= (getvar 'writestat) 0))
  5.     (progn (acad-push-dbmod)
  6.            (setq e (getvar 'expert))
  7.            (setq c (getvar 'cmdecho))
  8.            (vla-save (vla-get-activedocument (vlax-get-acad-object)))
  9.            (setvar 'expert 5)
  10.            (setvar 'cmdecho 0)
  11.            (setvar 'ctab "Model")
  12.            (if (= 0 (getvar 'worlducs))
  13.              (command "_.ucs" "_World")
  14.            )
  15.            (command "_.-wblock" (strcat (getvar 'dwgprefix) (getvar 'dwgname)) "*")
  16.            (setvar 'expert e)
  17.            (setvar 'cmdecho c)
  18.            (acad-pop-dbmod)
  19.            (if (= 0 (getvar 'cmdactive))
  20.              (vl-cmdf "_.close" "_Yes")
  21.            )
  22.     )
  23.     (alert "\nThis routine only works on drawings that have been saved or not readonly.")
  24.   )
  25.   (princ)
  26. )

回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2016-12-1 08:31:42 | 显示全部楼层
Cool! Thank you.
I didn't even realize wblock would do that.
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2016-12-1 11:57:19 | 显示全部楼层
Word to the wise: Set all viewports and all spaces (i.e. model-space, paper-space) to the World Coordinate System (WCS) before using the WBlock cleaning technique (or -ExportToAutoCAD) lest some drawings go wharrgarbl.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 20:27 , Processed in 0.712994 second(s), 69 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表