几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » ObjectARX(AutoLISP)
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-25, 09:55 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 [分享]通用函数

[分享]通用函数
www.dimcax.com

刚开始直接点,下不下来
后来发现要用右键另存为才能下
奇怪奇怪
d
谢谢分享
d
感谢分享,在慢慢探索中
d
不错了。。。支持一下
d
;; 相同内容文字按上→下→左→右相连线
(defun c:test766 (/ s1 ss i ptn)
(cmdla0)
(if (and (setq s1 (car (entsel "\n请选取要连线的其中一个文字: ")))
(= (xyp-get-dxf 0 s1) "text")
)
(progn
(prompt "\n框选所要连线的范围: ")
(setq ss (ssget (list '(0 . "text") (cons 1 (xyp-get-dxf 1 s1))))
i -1
ptn '()
)
(setvar "osmode" 0)
(xyp-mklaco "test" 1)
(while (setq s1 (ssname ss (setq i (1+ i))))
(setq ptn (cons (xyp-get-dxf 10 s1) ptn))
)
(if ptn
(xyp-entmake-lwpolyline (xyp-sort-plistbyxyz ptn) nil)
)
)
)
(cmdla1)
)
没有最好,只有更好!
-----------------------------
xyp1964@sina.com 网络u盘:cl-gettile klst)
(defun mt (key lst / a)
(cond ((= key "1") (foreach a lst (mode_tile a 0)))
((= key "0") (foreach a lst (mode_tile a 1)))
)
)
(mt bo0 '("t00" "t01"))
(mt bo1 '("t10" "t11"))
(mt bo2 '("t20" "t21"))
(mt bo3 '("t30" "t31"))
(mt bo4 '("t40" "t41"))
(mt bo5 '("t50" "t51"))
(mt bo6 '("t60" "t61"))
(mt bo7 '("t70" "t71"))
(mt bo8 '("t80" "t81"))
(mt bo9 '("t90" "t91"))
)
(defun bbb ()
(foreach a klst (set_tile a "1"))
(aaa)
)
(defun ccc ()
(foreach a klst (set_tile a "0"))
(aaa)
)
(xyp-initset
'(bo0 t00 t01 bo1 t10 t11 bo2 t20 t21 bo3 t30 t31 bo4 t40 t41 bo5 t50 t51 bo6 t60 t61 bo7 t70
t71 bo8 t80 t81 bo9 t90 t91 r1 r2 r3)
'("0" "" "" "0" "" "" "0" "" "" "0" "" "" "0" "" "" "0" "" "" "0" "" "" "0" "" "" "0" "" "" "0"
"" "" "1" "0" "0")
)
(setq ilst '((nil nil ":row{")
("bo0" "dist0" "bool" "(aaa)")
("t00" "" "str" "10")
("t01" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo1" "dist1" "bool" "(aaa)")
("t10" "" "str" "10")
("t11" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo2" "dist2" "bool" "(aaa)")
("t20" "" "str" "10")
("t21" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo3" "dist3" "bool" "(aaa)")
("t30" "" "str" "10")
("t31" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo4" "dist4" "bool" "(aaa)")
("t40" "" "str" "10")
("t41" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo5" "dist5" "bool" "(aaa)")
("t50" "" "str" "10")
("t51" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo6" "dist6" "bool" "(aaa)")
("t60" "" "str" "10")
("t61" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo7" "dist7" "bool" "(aaa)")
("t70" "" "str" "10")
("t71" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo8" "dist8" "bool" "(aaa)")
("t80" "" "str" "10")
("t81" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bo9" "dist9" "bool" "(aaa)")
("t90" "" "str" "10")
("t91" "" "str" "10")
(nil nil "}")
(nil nil ":row{")
("bt1" "全选" "button1" "(bbb)")
("bt2" "全部取消" "button1" "(ccc)")
(nil nil "}")
(nil nil ":boxed_radio_row{label=\"操作\";")
("r1" "默认" "radio")
("r2" "代替" "radio")
("r3" "插入" "radio")
(nil nil "}")
(nil nil "user" "(aaa)")
)
)
(if (= (xyp-dcl-init ilst "【整体替换】" t) 1)
(princ "test-ok")
)
)
没有最好,只有更好!
-----------------------------
xyp1964@sina.com 网络u盘:://xyp1964.ys168.com 群:24942984
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭



所有的时间均为北京时间。 现在的时间是 05:09 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多