明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: 峰峰兒

lisp程式

  [复制链接]
发表于 2012-8-3 14:29:28 | 显示全部楼层

(defun c:ll3()  
     (setq dp (open "seminest.dat" "w")
     (command "osnap" "off")
     (setq pt1 (getpoint "\n第一點位置 : "))
     (setq pt2 (getcorner pt1 "\n第二點位置 : "))
     (command "dxfout" "kk7" "v" "r12" "e" "w" pt1 pt2 "" "")   
     (command "r13kk7")
     (command "r13k2")
     (command "osnap" "cen,nea,end,mid,per,int,ins")
     (setq p1 (getpoint "\n選擇右上角位置 : "))
     (setq WIA  (getstring "\n請輸入編號: "))
     (setq WIB  (getstring "\n請輸入工程編號: "))
     (setq p1x (car p1) p1y (cadr p1) )
     (command "semitran")
     (command "semitr2a")
     (command "cssort1")
;|     
     (command "G70CLAW")
     (setq gg (open "dpal.txt" "a"))
     (setq lin1 (strcat "(X" (rtos p1x 2 1) "Y" (rtos p1y 2 1)WIA "-" WIB ")" ))
     (princ lin1 gg) (write-line " " gg)
     (close gg)
|;     
     (command "G70CLAW")
     (setq lin1 (strcat "(X" (rtos p1x 2 1) "Y" (rtos p1y 2 1) WIA "-" WIB ")" ))
     
     (setq gg (open "dpal.txt" "r"))
     (while (setq str (read-line gg))
       (setq strss (cons str strss))
     )  
     (close gg)
     
     (setq gg (open "dpal.txt" "w"))
     (princ lin1 gg) (write-line " " gg)
     (foreach str  (reverse strss)
       (write-line str gg)
     )
     (close gg)

     (command "E8")
)

程式碼不是自己寫的嗎?
單只改後段沒能看懂?
 楼主| 发表于 2012-8-3 18:15:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2012-8-19 16:24:09 | 显示全部楼层
看不懂這是什麼
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-8 02:14 , Processed in 0.172461 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表