;* CNC2.LSP ;* ;* Program to get location of line/arc end, draw a small donut at that ;* location, draw a leader line to text location and them print location ;* of that point on the print. This is particurarly useful for ;* programming CNC turning centers/lathes. Part should be moved so that ;* origin of part is at 0,0. ;* by g. mc duffee at allen county community college 11/9/1993. ;* major difference from cnc1.lsp is inversion of axis values (vmon) (defun C:cnc () ( setq cmdech (getvar "CMDECHO")) ( setvar "CMDECHO" 0) ( graphscr ) ( setq txthgt (getvar "TEXTSIZE")) ( setq cncp (getpoint "\nPick CNC Point.")) ( setq xnum (car cncp)) ( setq ynum (cadr cncp)) ( setq xtxt (rtos xnum 2 3)) ( setq ytxt (rtos ynum 2 3)) ( setq cnctxt (strcat xtxt ", " ytxt " ")) ( setq txtp (getpoint "\nPick text location ")) ( command "TEXT" "R" txtp txthgt 90 cnctxt) ( command "LINE" txtp cncp "") ( command "DONUT" "0" "0.05" cncp "") ( setvar "CMDECHO" cmdech) ( princ) )