Author Topic: Rotate text of block after insert.. hangs in 2008 now?  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
Rotate text of block after insert.. hangs in 2008 now?
« on: February 09, 2008, 11:24:42 PM »
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:
Code: [Select]
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:

Code: [Select]
(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)
)

KewlToyZ

  • Guest
Re: Rotate text of block after insert.. hangs in 2008 now?
« Reply #1 on: February 10, 2008, 12:04:06 AM »
Duhhhhhh  :ugly: :lmao:

Code: [Select]
(defun c:tstat()
(setq sc (getvar "dimscale"))
(setq usersnaps (getvar "osmode")) ; -----------------------Get User Osmode Settings
(setq userlayer (getvar "clayer")) ; -----------------------Get User Layer Settings
;(alert "\nNew Thermostat routine, watch the prompts.")
(setvar "osmode" 695)
(setvar "autosnap" 13)
(setq inspt(getpoint "\nSelect Wall (Line, Polyline, Arc, Circle) ESC to EXIT:"))

(command "-insert" "mechanical/kta_mdv005" "s" sc inspt pause)

(command "._explode" "last") ;

(setq tst (entlast))
(setq rotpt (cdr (assoc 10 (entget tst))))
(command "rotate" tst "" rotpt 0)
(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!!")
;==========================================

(prompt "\nChoose the wire path.... Tap the spacebar three times when done!!")
(command "spline")
(WHILE (WCMATCH (GETVAR "CMDNAMES") "*SPLINE*") (COMMAND pause))
(command "regen")
(command "osmode" usersnaps); -----------------------Return User Osmode Settings
(command "clayer" userlayer); -----------------------Return User Layer Settings
(prompt "\n Thermostat Osnaps & Layer Returned.")
(princ)
)