
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there anyone that can edit this lisp routine so that it adds the prefix to an overridden dimension?
(defun c:rowround ()
(vl-load-com)
(setq letterlength 1)
(setq nextletter "A")
(setq letters "ABCDEFGHIJKLMNOPQRSTUVWXYZAABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZAAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ")
(setq prefixposition 0)
(while (/= nextletter nil)
(if (> prefixposition 25)
(and
(setq letterlength 2)
;(setq prefixposition (+ prefixposition 1))
))
(setq nextletter (substr letters (+ prefixposition 1) letterlength))
(setq textString (getstring (strcat "\nEnter starting letter or <Enter> for next letter " nextletter " : ")))
(if (or (= textstring nil)(= textstring "")) (setq textstring nextletter)(setq textstring (strcase textstring)))
(setq prefixposition (vl-string-search textstring letters))
(setq dimobject (entsel))
(setq dimdxf (entget (car dimobject)))
(setq dimobjectename (car dimobject))
(setq vladimobject (vlax-ename->vla-object dimobjectename))
(setq splits (vla-get-textprefix vladimobject))
(if (> (vl-string-search "SPLITS" splits) 0)
(setq tprefix (strcat "ROW '" textstring "' (SPLITS) - "))
(setq tprefix (strcat "ROW '" textstring "' - "))
)
(setq splits "")
(if (= (cdr (assoc 0 dimdxf)) "DIMENSION")
(vla-put-textprefix vladimobject tprefix)
(princ "NO"))
(setq prefixposition (+ prefixposition 1))
)
)
Solved! Go to Solution.