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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(AutoLISP) (http://www.dimcax.com/hust/forumdisplay.php?f=178)
-   -   [求助]怎样用ssget检索特定的cass编码? (http://www.dimcax.com/hust/showthread.php?t=11175)

yang686526 2009-04-26 01:36 PM

[求助]怎样用ssget检索特定的cass编码?
 
[求助]怎样用ssget检索特定的cass编码?
www.dimcax.com
[求助]怎样用ssget检索特定的cass编码?
怎样用ssget检索特定的cass编码?
不依赖cass程序而只是用lisp进行操作.
d
只用一个ssget函数可能不能实现“检索特定的cass编码”,
可用ssget选择了包含"south"的图元后,再逐个判断"south"的值,来达到目的。
d
可以提供一个代码的样例吗?
d
下面的示例仅供参考:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (sc_ssget scode) ;;
;; 返回有特定south扩展数据的选择集 ;;
;; scode south扩展数据 ;;
;; 示例 ;;
;; (setq ss(sc_ssget "141121")) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun sc_ssget(scode / ss sn si i ed sc scss)
(setq ss(ssget "x" '((-3 ("south")))))
(setq sn(if ss (sslength ss) 0))
(setq scss(ssadd))
(setq i 0)
(while(< i sn)
(setq si(ssname ss i))
(setq ed(entget si '("south")))
(setq sc(cdr(cadr (cadr (assoc -3 ed)))))
(if(= sc scode)
(ssadd si scss)
)
(setq i(1+ i))
)
scss
)
;
d


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