Message 1 of 22
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Have this routine I use often, but it only allows you to select one extension line. I would like to be able to select multiple, so I don't have to repeat the routine for each extension line I select.
(defun c:nox(/ notdim stillon tryext oce es en pt ed)
;Return T if <edata> is not a dimension
(defun notdim (edata)
(/= "DIMENSION" (cdr (assoc 0 edata))))
(defun stillon (edata pnt / ssp)
(if (setq ssp (ssget pnt))
(equal
(cdr (assoc -1 edata))
(ssname ssp 0))))
;Return T if extension goes away, nil otherwise
(defun tryext (extnum edata pnt)
(command "dim" "override" (strcat "dimse" (itoa extnum)) "on" "" en "")
(cond
((stillon edata pt)
(command "undo" "exit")
nil)
(t
(command "exit")
'T)))
;Main:
(setq oce (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "undo" "g")
(if (setq es (entsel "\nPick extension line to suppress: "))
(progn
(setq
en (car es)
pt (cadr es)
ed (entget en))
(cond
((notdim ed)
(princ "\nNot a dimension."))
((tryext 1 ed pt))
((tryext 2 ed pt))
((princ "\nNot an extension line.")))))
(command "undo" "e")
(setvar "cmdecho" oce)
(princ))
Solved! Go to Solution.