
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello guys. I have a dimtxt height lisp. but changed dimtxt too small.
I want, change dimtxt according to input figure(number) ... thank you
;; DimTextHeightReset.lsp [command name = DTHR]
;; To remove any text height overrides on existing Dimensions so that
;; they take their text height from their Style definition.
;; [modified by Kent Cooper, April 2016, from one for Dimension Text Color
;; with elements contributed by pbejse & Kent1Cooper, June 2012]
(Defun C:DTHR (/ ss n ent 3data 3dataEnd edata 3dataRev)
(if (setq ss (ssget '((0 . "DIMENSION"))))
(repeat (setq n (sslength ss))
(setq ent (ssname ss (setq n (1- n))))
(if
(and
(setq 3data (cadr (assoc -3 (entget ent '("ACAD"))))); it has eXtended data
(setq 3dataEnd (member '(1070 . 140) 3data))
; it has a text-height override [saved in following 1040 entry]
); and
(progn ; then
(setq
edata (entget ent); "base" entity data without Xdata
3dataRev (reverse 3data); reverse to take end entries off with (cdr) below
); setq
(repeat (length 3dataEnd); strip back to Xdata prior to text-height override
(setq 3dataRev (cdr 3dataRev))
); repeat
(entmod ; update Dimension to take text height from Style definition
(append ; put entity data together with Xdata stripped of text-height override
edata ; without Xdata
(list
(cons
-3 ; for Xdata
(list (append
(reverse 3dataRev); re-reversed 3data without text height & beyond
(cddr 3dataEnd); add remainder stripped of text-height entries
)); append & list
); cons
); list
); append
); entmod
); progn
); if
); repeat
); if [any Dimensions found]
(princ)
); defun - DTHR
(prompt "\nType DTHR for Dimension Text Height Reset.")
Solved! Go to Solution.