Dimension Layer Lisp Help for 2015

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
AutoCAD seems to freeze for 5-10 minutes any time I try to copy/paste from one drawing to another, or bring in a tool pallette file. I removed the below dimesion lisp and AutoCAD seems to run fine. Any idea why this might be happening? It is clearly related to the below lisp that is used to change any dimension added to the "DIMENSION" layer automatically. Thanks in advance!
(if (not (tblsearch "layer" "DIMENSION"))
(progn
(entmake
(list
'(0 . "LAYER")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbLayerTableRecord")
(cons 2 "DIMENSION")
'(70 . 0)
(cons 62 3)
)
)
) ;_progn
) ;_if
(if (not acdb:reactor)
(setq acdb:reactor
(vlr-AcDb-Reactor
nil
'((:vlr-objectappended . a+objcreated))
)
)
)
(if (not acdb:reactor2)
(setq acdb:reactor2
(vlr-command-reactor
nil
'((:vlr-commandended . a+commandended))
)
)
)
(defun a+objcreated (Reac Args / ent)
(setq ent (cadr args))
(if (and
(null (member ent objcreated))
)
(progn
(setq objcreated (cons ent objcreated))
)
)
)
(defun a+commandended (Reac Args / ent entl vla)
(foreach ent objcreated
(if (and
ent
(setq entl (entget ent))
(member (cdr (assoc 0 entl)) (list "DIMENSION" "LEADER"))
(/= (cdr (assoc 8 entl)) "DIMENSION")
)
(progn
(setq vla (vlax-ename->vla-object ent))
(vla-put-layer vla "DIMENSION")
(vla-update vla)
)
)
)
(setq objcreated nil)
(princ)
)