added xref management and proxygraphics

This commit is contained in:
2019-09-18 22:06:22 +02:00
parent e6456bce4b
commit 135008b4c4
3 changed files with 44 additions and 8 deletions

View File

@@ -5,10 +5,12 @@ Clean dwg files before linking them to Revit
### Current features:
- change to model space
- binds and detaches all xrefs (you can uncomment this line so it only detaches them)
- remove all xlines from model space and from blocks
- delete all points from modelspace
- move hatches to separate layers
- attribute definitions not in block to txt because they are not showing up in Revit
- PROXYGRAPHICS=1 (one less annoying dialog)
- purge
- audit
- save as 2013 dwg
@@ -17,6 +19,5 @@ Clean dwg files before linking them to Revit
- move closer to origin
- remove layouts
- do something with xrefs(bind or purge)
- replace heavy linestyles and hatches
- ask for units for automatic import

View File

@@ -4,13 +4,25 @@
;
._MODEL
;------------------------------------------------------------
;XREF manegement is completely disabled until I fix it
;._-xref
;r
;*
;._-xref
;b
;*
;XREFS: bind and detach all
(defun C:bindAndDetachXrefs (/ blk)
(graphscr)
(foreach x
(mapcar 'cadr (ssnamex (ssget "_X" '((0 . "INSERT") (410 . "MODEL")))))
(setq blk (cdr (assoc 2 (entget x))))
(if (assoc 1 (tblsearch "block" blk))
(progn
(command "_.-xref" "_bind" blk)
(command "_.-xref" "_detach" blk)
)
)
)
)
;If you don't want to bind just detach uncomment the following line:
bindAndDetachXrefs
;------------------------------------------------------------
;Detach all xrefs.
._-xref d *
;------------------------------------------------------------
;deleteAllXlines.lsp: deletes all xlines in modelspace
(defun C:dax (/ ss)
@@ -154,6 +166,8 @@ sephatch
)
AttDef2Text
;------------------------------------------------------------
PROXYGRAPHICS
1
._-PURGE
a
*

View File

@@ -0,0 +1,21 @@
;; bindAndDetachXrefs.lsp
;;
;; bind and detach all xrefs, detach missing
;;
;; Created by Peter Gyetvai
;; gyetpet@mailbox.org
(defun C:bindAndDetachXrefs (/ blk)
(graphscr)
(foreach x
(mapcar 'cadr (ssnamex (ssget "_X" '((0 . "INSERT") (410 . "MODEL")))))
(setq blk (cdr (assoc 2 (entget x))))
(if (assoc 1 (tblsearch "block" blk))
(progn
(command "_.-xref" "_bind" blk)
(command "_.-xref" "_detach" blk)
)
)
)
)