I gotcha. Makes sense to put all the calls under one command rather than a command for each.
J. Logan
|
I gotcha. Makes sense to put all the calls under one command rather than a command for each.
J. Logan
Getting back to this. I found that the setq rev4 hangs after the Ref1 setq statement if there isn't any "Text2" entities with Oblique 30 and angle 20 in the drawing. it will show the selection set and then you have to hit enter for it to move on. if it exists everything runs fine.
I posted this earlier in the thread
Command: ERBDR-STD
ERBDR
Working, please wait... <Selection set: 8>
Unknown command "VLIDE". Press F1 for help.
-- Unknown command "75,21.4375". Press F1 for help.
-- Unknown command "75,21.4375". Press F1 for help.
-- Unknown command "E". Press F1 for help.
the numbers and the "E" are the copy command at the end of the this routine. It seems if I comment out the setq Rev4 section and remove Rev4 from the copy command all is fine.
I'm guessing I need some kind of "IF" statement for that setq rev4 section.
(defun c:foo (/ rev1 rev4 ref1)
(setq rev1 (ssget "_c"
'(33.375 21.4375)
'(31.875 5.3125)
'((8 . "Text2,Line4"))
)
)
;;the following setq was changed to find Oblique and angle text on TEXT2 layer
(setq rev4 (ssget "x"
(list '(8 . "TEXT2")
(cons 50 (/ pi 6))
(cons 51 (/ pi 9))
)
)
)
(setq ref1 (ssget "_c"
'(28.9375 4.9375)
'(33.5625 3.3125)
'((8 . "Text2"))
)
)
(command "._copy" rev1 rev4 ref1 "" "31.75,21.4375" "38.75,21.4375" "E")
)
I never could "step through" for debugging.
J. Logan