本帖最后由 null. 于 2025-2-27 11:30 编辑
 - (defun sanjiao();;ang1 ang2 ang3 ang4
- (setq ang1 0)
- (setq ang2 (/ PI 2))
- (setq ang3 PI)
- (setq ang4 (/ (* 3 PI) 2))
- )
- chushihua
- (defun chushihua(/ pLw delobj_old clay clt osm orth tbL1 tbL2 tbL3 tbL4 tbL5 tbL6 tbL7 tbL8)
- (setvar "cmdecho" 0)
- (setvar "blipmode" 0)
- (setq plw (getvar "PLINEWID"))
- (setq delobj_old (getvar "delobj"))
- (setq clay (getvar "clayer"))
- (setq clt (getvar "CELTYPE"))
- (setq osm (getvar "osmode"))
- (setq orth (getvar "orthomode"))
- (setvar "delobj" 1)
- (setvar "orthomode" 1)
- (setvar "PLINEWID" 0)
- ;;; (setvar "3dosmode" 1)
-
- (vl-load-com)
- (setq tbL1 (tbLsearch "ltype" "center"))
- (if(= tbL1 nil) (command "-linetype" "L" "center" "acadiso" ""))
- (setq tbL2 (tbLsearch "ltype" "divide"))
- (if(= tbL2 nil) (command "-linetype" "L" "divide" "acadiso" ""))
- (setq tbL3 (tbLsearch "ltype" "hidden"))
- (if(= tbL3 nil) (command "-linetype" "L" "hidden" "acadiso" ""))
- (setq tbL4 (tbLsearch "layer" "cen_lay"))
- (if(= tbL4 nil) (command "-layer" "N" "cen_lay" "L" "center" "cen_lay" "C" 1 "cen_lay" ""))
- (setq tbL5 (tbLsearch "layer" "dim_lay"))
- (if(= tbL5 nil) (command "-layer" "N" "dim_lay" "L" "continuous" "dim_lay" "C" 6 "dim_lay" ""))
- (setq tbL6 (tbLsearch "layer" "suports_lay"))
- (if(= tbL6 nil) (command "-layer" "N" "suports_lay" "L" "continuous" "suports_lay" "C" 4 "suports_lay" ""))
- (setq tbL7 (tbLsearch "layer" "pipe_lay"))
- (if(= tbL7 nil) (command "-layer" "N" "pipe_lay" "L" "continuous" "pipe_lay" "C" 112 "pipe_lay" ""))
- (setq tbL8 (tbLsearch "layer" "equipment_lay"))
- (if(= tbL8 nil) (command "-layer" "N" "equipment_lay" "L" "continuous" "equipment_lay" "C" 4 "equipment_lay" ""))
-
- (command "VSCURRENT" 2 )
-
- );;end chushihua
- (defun rtod(val);;val
- (/ (* val 180.0) PI) ; 弧度转十进位度
- )
补充这几个函数,就正常了
|