;DE command will dimension the xy coords of the endpoint of any line
; or arc with leader, with text automatic and inserted as X 0.3426 , Y 6.4356

(defun c:de ()
     (setvar "cmdecho" 0)
     (command "osnap" "end")
     (setq p1 (getpoint "Select line near endpoint"))
     (setq p2 (getpoint p1 "Select cen of Leader"))
     (setq px (rtos (nth 0 p1 ) 2 4))
     (setq py (rtos (nth 1 p1 ) 2 4))
     (setq txt (strcat "x " px " , " "y " py))
     (command "dim1" "leader" p1 p2 "" txt)
     (setvar "cmdecho" 1)
)



用(附屬應用程式)中的(記事本)輸入上面的程式....再另存新檔,檔名是DE.LISP




執行 AutoCAD.....
開啟舊檔....
點選(工具)...(載入應用程式)....DE.LISP
在指令列輸入....DE





移動滑鼠......點選線的端點....便會出現X,Y座標




arrow
arrow
    全站熱搜

    jack60455867 發表在 痞客邦 留言(8) 人氣()