Am I shootin' for the Moon here?
This old routine requires the user to type one character at a time and hit enter for each one.
The result is blocks (polylines not actual text) representing those characters being inserted for the purpose of laser engraving on our metal products. What I could use help on is trying to type in all characters and hit enter once to complete the process.
I know this is probably a stretch, but any ideas how to accomplish this would be greatly appreciated. Thanks.
(DEFUN C:LASERTXT()
; This routine will:
; Create & set current the "CNC" layer with a color of "140"
; Create layer called "TICS"
; Insert (8) blocks representing single digit numbers OR letters as polylines
; - scale of (1) and a height of .249
;
; All 8 characters must then be indicated.... by typing
; a single character and pressing enter for each
; User must select an insertion point for the each character (users choice)
;
; Insertion points will appear as lines (tics) and must be selected accordingly
; as each character is placed in the drawing
;
; Inserted blocks are exploded
; Layer "TICS" is deleted and drawing is purged at conclusion
;
; The following drawing files must be available for this to work:
;
; 0 thru 9 and A thru Z
(COMMAND "-LAYER" "m" "TICS" "")
(COMMAND "-LAYER" "m" "cnc" "c" "255" "CNC" "s" "cnc" "")
(INITGET 128)
(SETQ NUM1 (GETKWORD "\n1st Character : "))
(INITGET 128)
(SETQ NUM2 (GETKWORD "\n2nd Character: "))
(INITGET 128)
(SETQ NUM3 (GETKWORD "\n3rd Character: "))
(INITGET 128)
(SETQ NUM4 (GETKWORD "\n4th Character: "))
(INITGET 128)
(SETQ NUM5 (GETKWORD "\n5th Character: "))
(INITGET 128)
(SETQ NUM6 (GETKWORD "\n6th Character: "))
(INITGET 128)
(SETQ NUM7 (GETKWORD "\n7th Character: "))
(INITGET 128)
(SETQ NUM8 (GETKWORD "\n8th Character: "))
(COMMAND "-insert" NUM1 PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM2 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM3 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM4 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM5 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM6 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM7 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(COMMAND "-insert" NUM8 "ENDPOINT" PAUSE "1" "1" "0")
(command "explode" "last")
(setq ss (ssget "X" '((8 . "TICS"))))
(command ".erase" ss "")
(COMMAND "-PURGE" "ALL" "" "N")
)