I had this running fine up until a month ago.
Now I'm not even sure why it quit.
I'm trying to figure out why it repeats the last command before I began this one.
It seems to be happening during the entget?
command line feedback:
Command: ts
Select Wall (Line, Polyline, Arc, Circle) ESC to EXIT:Unknown command "TS".
Press F1 for help.
TS Unknown command "TS". Press F1 for help.
M-CONT-WIRE layer set!!
Choose the wire path.... Tap the spacebar three times when done!!
Thermostat Osnaps & Layer Returned.
Command:
Automatic save to C:\_KTA MEP\Autosave\Drawing1_1_1_6777.sv$ ...
Command:
Command: ts
Select Wall (Line, Polyline, Arc, Circle) ESC to EXIT:Unknown command "TS".
Press F1 for help.
TS Unknown command "TS". Press F1 for help.
M-CONT-WIRE layer set!!
Choose the wire path.... Tap the spacebar three times when done!!
The code I'm running:
(defun c:tstat(/ tstobj rotpt en ed)
(setq sc (getvar "dimscale"))
(setq inspt(getpoint "\nSelect Wall (Line, Polyline, Arc, Circle) ESC to EXIT:"))
(command "-insert" "mechanical/kta_mdv005" "s" sc inspt pause)
;(command "qaflags" 0)
(command "explode" "last" "") ;
;(command "qaflags" 1)
(setq tstobj (entlast))
(setq rotpt (cdr (assoc 10 (entget tstobj))))
(command "rotate" "l" "" rotpt "0" pause)
(setq en (entlast))
(while ;1
(setq en (entnext en))
(setq ed (entget en))
(if ;2
(equal (cdr (assoc 0 (entget en))) "ATTRIB")
(progn ;3
(setq ed ;4 rotate attribute to 0
(subst (cons 50 0) ;5
(assoc 50 ed)
ed
) ;-4
) ;-3
(entmod ed)
(entupd en)
) ;-2
) ;-1
)
;========================================== Layer Set For TStat Wire
(command "Expert" 3)
(command "linetype" "Load" "SML-DASH" "kta.lin" "")
(command "layer" "m" "M-CONT-WIRE" "l" "SML-DASH" "M-CONT-WIRE" "c" 7 "M-CONT-WIRE" "LW" 0.35 "M-CONT-WIRE" "" )
(command "Expert" 0)
(prompt "\n M-CONT-WIRE layer set!!")
;==========================================
(setvar "osmode" 191)
(setvar "autosnap" 13)
(prompt "\nChoose the wire path.... Tap the spacebar three times when done!!")
(command "spline")
(WHILE (WCMATCH (GETVAR "CMDNAMES") "*SPLINE*") (COMMAND pause))
(command "regen")
(prompt "\n Thermostat Osnaps & Layer Returned.")
(princ)
)