 - (defun c:zxx (/ se rg f xxx xxy xxx1 xxy1 xxx2 xxy2 cep)
- (setvar "CMDECHO" 0)
- (setvar "FILEDIA" 0)
- (setvar "LUPREC" 8)
- (setq se (entsel "\n 请选取欲求形心的多义线:"))
- (command "copy" se "" "0,0" "0,0")
- (command "region" se "")
- (setq rg (entget (entlast)))
- (command "massprop" "l" "" "y" "d:/ZZX.mpr")
- (command "erase" "l" "")
- (setq f (open "d:/ZZX.mpr" "r"))
- (read-line f)
- (read-line f)
- (read-line f)
- (read-line f)
- (read-line f)
- (read-line f)
- (read-line f)
- (setq xxx (read-line f))
- (setq xxy (read-line f))
- (close f)
- (setq xxx1 (substr xxx 25 20))
- (setq xxy1 (substr xxy 25 20))
- (setq xxx2 (atof xxx1))
- (setq xxy2 (atof xxy1))
- (setq cep (list xxx2 xxy2 0))
- (entmake (list (cons 0 "point")(cons 8 "temp") (cons 10 cep)))
- (setvar "FILEDIA" 1)
- (setvar "LUPREC" 2)
- )
以前用的,不知道出自何处,希望高手能够帮忙改成具有上面功能的程序!
|