備註:輸出的欄列值起始為0 ;;;點選某格的表格中得到欄列 (defun c:tt (/ table outRow outCol) (setq table (entsel "\n選取表格:")) (vla-HitTest (vlax-ename->vla-object (car table)) (vlax-3d-point (cadr table)) (vlax-3d-point (trans (getvar 'ViewDir) 1 0)) 'outRow 'outCol ) (setq val (vlax-variant-value (vla-GetCellValue (vlax-ename->vla-object (car table)) outRow outCol ))) (prompt (strcat "\nRow:" (itoa outRow))) (prompt (strcat "\nCol:" (itoa outCol))) (prompt (strcat "\n文字:" (cond ((eq 'STR (type val)) val) ((eq 'INT (type val)) (itoa val)) ((eq 'REAL (type val)) (rtos val)) (T "") );_cond ) ) (princ) ) ;_end 相關連結 AutoCAD 如何載入LISP