; EDT.LSP v1.2 [9/24/90] (c)1990 David P. Hoekstra ; An onscreen text editor in the graphics mode in AutoCAD. ;-------------------------------------------------------------- ; ; This program has been designed to be a 'natural' feeling text ; editor for AutoCAD, it uses real cursor keys, big right or ; left, home, end, delete to end of line, go to previous line, return ; orginal string, make word upper or lowercase, backspace and delete. ; The help file EDT.TXT contains more detailed instructions for the ; use of this program. ; ; If you find EDT.LSP easy and convenient to use, a registration of $25 ; would be appreciated. If you send $35, you will recieve a fully ; documented, expanded copy of the latest version of this program. ; The contents of this program, whole or in part, cannot be distributed ; for commercial purposes without the written consent of the author. ; Please do not distribute program unless all of the following three ; files are included: ; ; EDT.LSP - Main Program file ; EDST.LSP- Separate subroutines to be loaded into and out ; of memory. ; EDT.TXT - Help and explanation file. ; ; Please send check or money order to: ; ; David Hoekstra ; 3278 S. Dudley St. ; Lakewood, CO 80227 ; ph. (303) 989-1160 ; ; INSTALLATION ; ~~~~~~~~~~~~ ; EDST.LSP, the file that contains all the subroutines necessary ; for the program to run, and be able to optionally clear them from ; memory, needs to be in a directory that AutoCAD can find. ; ; ie C:\ACAD\ or in the DOS path statement. ; ; The program uses ANSI escape sequences to remap the cursor keys, ; the ANSI.SYS program must be installed in the CONFIG.SYS file ; on your bootup disk or drive ; ; ie C:\CONFIG.SYS should contain the line: ; device=c:\ANSI.SYS ; ; Load EDT with the command '(load "edt")', either at the 'command:' ; prompt or as a statement in your ACAD.LSP file. Run EDT by typing ; EDT at the 'command:' prompt. Select entities by any acceptable ; AutoCAD method, EDT will present text entities for editing one at a time, in ; the order they were selected, or, if selected by window, the most recent ; entities first. You move forward through the selection set by pressing ; return, pressing CNTRL return will move you to the previous text ; entity. ; ; For detailed instructions, see the file EDT.TXT. ; ; GLOBAL VARIABLES ; ~~~~~~~~~~~~~~~~ ; The program creates the variable EDTM, toggled by the command, ; 'EDTMEM'. When nil, the EDT routine clears all subroutines from ; memory and reload then when EDT is called. ; ;------------------------------------------------------------------------ (prompt "\nEDT.LSP by David Hoeksta, text editing routine for AutoCAD\n") (defun c:edtmem ( / s)(if EDTM (setq EDTM nil s "\nEDT routines will be cleared from memory\n") (setq EDTM 1 s "\nEDT routines will remain in memory\n"))(princ s)(princ))(load "edst")(setq EDTM 1) (defun c:edt ( / j k l e m CURSRBLINK) ; (setq CURSRBLINK 10) ;------------------------------------------------------------------------- ; sets the cursor blinking rate, smaller=faster ;------------------------------------------------------------------------- (if (not ea)(load "edst"))(setq eh *error* *error* er j (ssget) k 0 l (sslength j)) (repeat 24 (print))(textscr)(write-line "\e[0;75;129p")(write-line "\e[0;77;130p") (write-line "\e[0;72;131p")(write-line "\e[0;80;131p")(graphscr)(setq m (strcat (chr 250) (chr 250)(chr 250)(chr 250)(chr 127)))(prompt "\n\t\t\tEDT.LSP - AutoCAD Text Editor") (prompt (strcat "\n" m m m m m m m m m m m m m m m m "\n"))(while (< k l) (setq e (ssname j k))(if (= "TEXT" (cdr (assoc 0 (entget e))))(ea e)) (setq k (1+ k)))(repeat 24 (print))(textscr)(write-line "\e[0;75;0;75p") (write-line "\e[0;77;0;77p")(write-line "\e[0;72;0;72p")(write-line "\e[0;80;0;80p") (print)(print)(print)(graphscr)(if (not EDTM)(setq ea nil eb nil ec nil ed nil ee nil ef nil eg nil er nil))(setq *error* eh)(princ))