明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 325|回复: 0

cass高程点批量不建模

[复制链接]
发表于 2023-4-11 17:05 | 显示全部楼层 |阅读模式
  1. ;   (-3 ("SOUTH" (1000 . "202101") (1000 . "20230409.351")) ("S_GXRQ" (1071 . 1681198240))) ;参加建模的高程点

  2. ;  (-3 ("S_GXRQ" (1071 . 1681198240)) ("SOUTH" (1000 . "202101") (1070 . 1))) ;不参加建模的高程点


  3. ;  (assoc "SOUTH" (cdr(assoc -3 (entget(car(entsel ""))'("*")))))



  4. ;  (append (assoc "SOUTH" (cdr(assoc -3 (entget(car(entsel ""))'("*"))))) (list(cons 1070 1)))

  5. ;选择集与对象名表互转
  6. (defun cx-ss2en
  7.   (ss / enlst)
  8.   (cond
  9.     ((= (type ss) 'PICKSET)
  10.       (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) (mapcar 'cadr (ssnamex SS)))
  11.     )
  12.     ((= (type ss) 'LIST)
  13.       (setq enlst (ssadd))
  14.       (last (mapcar '(lambda (x) (ssadd x enlst)) ss))
  15.     )
  16.     ((='ename(type ss))
  17.       (ssadd ss)
  18.     )
  19.   )
  20. )
  21. ;(entget(car(entsel))'("*"))

  22. (defun c:bujm ( / ss old new new1)

  23. (setq ss (ssget '((0 . "INSERT")(2 . "GC200") )   ))


  24.   (foreach x (cx-ss2en ss)
  25. (setq old (assoc "SOUTH" (cdr(assoc -3 (entget x '("*"))))) )
  26. (setq new (append old (list(cons 1070 1))) )

  27. (setq new1 (subst new old (assoc -3 (entget x '("*")) )     ))
  28.    (entmod (subst new1 (assoc -3 (entget x '("*")) )  (entget x '("*"))  ) )

  29. (princ)
  30.     )





  31.   )

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-23 17:33 , Processed in 0.177242 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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