Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
en respuesta a: Anonymous

Hi. This lisp looks so bad that it hurts when I look at it :cara_con_una_leve_sonrisa:

 

use this:

;--start--

(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))
)
)
)
(defun a+objcreated (Reac Args / entl)
(setq entl (entget (cadr Args)))
(if (and entl
(member (cdr (assoc 0 entl)) (list "DIMENSION" "LEADER"))
(/= (cdr (assoc 8 entl)) "DIMENSION")
)
(progn
(setq entl (subst (cons 8 "DIMENSION") (assoc 8 entl) entl))
(entmod entl)
)
)
)

(princ "\n Dimdef Loaded for more go to www.cadaplus.com :)")
(princ)

 

 

;--end--

 

works much faster and it will not replace original dimenisons commands

best regards

Jedrzej Cytawa

APLUS SA

www.cadaplus.com