This is a script type routine I run on drawings created in Solidworks.
I get dimensions with all sorts of different DIMSTYLES.
I want to change them all to Standard.
Here's what I have so far..
I don't know how to change (3."xxxx") to (3."Standard")
Also, can you do a TBLSEARCH for several items at once?
(DEFUN C:SWDX ()
(Prompt "Change SW Lines:")
(setq ss4 (ssget "x" '((0 . "LINE")(6 . "PHANTOM"))))
(setq TEST (tblsearch "LAYER" "X25"))
(if (= TEST nil)
(progn
(Command "-layer" "n" "X25" "C" "RED" "X25" "")
)
)
(command "CHANGE" ss4 "" "p" "la" "X25" "c" "bylayer" "lt" "Phantom" "LW" "default" "")
(setq ss5 (ssget "x" '((0 . "DIMENSION"))))
(setq TEST (tblsearch "LAYER" "DIM"))
(if (= TEST nil)
(progn
(Command "-layer" "n" "DIM" "C" "RED" "X25" "")
)
)
(command "CHANGE" ss5 "" "p" "la" "DIM" "c" "bylayer" "LW" "default" "")
[b];;; Need to change (3."xxxx") to (3. "Standard") for SS5[/b]
(setq ss9 (ssget "x" '((0 . "LINE")(6 . "*CENTER*"))))
(command "ERASE" ss9 "")
(princ))
I know my code writing skills are very elementary...
If there's a better way to do what I've done, I'm open.
If someone wants to just fill in the blanks that's fine too...
Thanks!