www.pudn.com > CADtool.rar > PS_jlxsz.lsp, change:2009-04-04,size:968b


;;;------------------------------------------------------------- 
;;; 井类型设置 
(defun C:PS_jlxsz (/  strJinType keyWord ssCircles strCircleEName 
                  k 
                 ) 
;;;------------------------------------------------------------- 
(setq ssCircles (SelectCircles "进行类型设置的井(圆)")) ; 创建井( 圆) 选择集 ssCircles,允许按圆直径条件过滤 
 
  (initget "A B") 
  (setq keyWord (getkword "\n所选择的井为[检查井(A)/沉砂井(B)]<A>:" )) 
  (if (= keyWord "B") 
   (setq strJinType "沉砂井") 
   (setq strJinType "检查井") 
  )       ; 默认相对里程为增加 
   
   (setq k -1) 
   (repeat (sslength ssCircles) ; 循环与所选择的对象数量相等的次数 
    (setq strCircleEName (ssname ssCircles (setq k (1+ k)))) ; obname,取得第k个对象名 
 
    (SetXdata strCircleEName (list "PS_Jin" (cons 1000 strJinType) ) ) ;添加井类型标记的扩展数据 
    )  
    (princ "井类型设置成功!") 
 (princ) 
) 
;;;-------------------------------------------------------------