Lee Mac 发表于 2022-7-5 15:48:46

如果你运行这个程序(命令:“ee”)并选择项目,你会得到什么?

Jadeous 发表于 2022-7-5 15:53:00

我加载了Lisp并运行EE命令。
 
以下是命令栏中出现的内容:
 
命令:ee
选择对象:
(
(-1 . )
(0.“MAPS_SOLID”)
(330 . )
(5.“21BE”)
(100.“AcDbEntity”)
(67 . 0)
(410.“模型”)
(8.“MP-HNGR”)
(8.“MP-HNGR”)
(300 . "3-1/2")
(300.“Celgene:2楼(+15’-0”)
(300.“管道工程:碳钢”)
(300.“碳钢x 0.0”)
(300 . "4")
(300 . "7")
(300.“0(英寸)”)
(300 . "0")
(300 . "0")
(300 . "")
(300.“ASJ x 1.5”)
)
命令:
 
之后什么都没发生。

danthecadman 发表于 2022-7-5 15:57:18

 
 
非常感谢!!我只需计算civil3d点300多个笔划,测量员就可以出发了。你刚刚帮我节省了两个多小时的工作时间。我想我欠你一杯啤酒!

Lee Mac 发表于 2022-7-5 16:00:48

 
谢谢你,丹我很高兴你发现这个程序非常有用,它为你节省了这么多时间!
 
干杯
 

minhphuong_humg 发表于 2022-7-5 16:06:00

 
帮助我,编辑以选择(通过windows)多块?
谢谢

Lee Mac 发表于 2022-7-5 16:08:36

 
将第一个函数更改为:
;; Points at Circle Centres within Block-Lee Mac
;; Prompts for selection of a block and creates points in modelspace
;; at the centre of every circle in the selected block

(defun c:ptcirblk ( / bn cl en id ml ss )
   (if (setq ss (ssget '((0 . "INSERT"))))
       (repeat (setq id (sslength ss))
         (setq id (1- id)
               en (ssname ss id)
               bn (cdr (assoc 2 (entget en)))
               ml (refgeom en)
         )
         (foreach pt
               (cond
                   (   (assoc bn cl)
                     (cdr (assoc bn cl))
                   )
                   (   (   (lambda ( bd / bl bx )
                               (while (setq bd (entnext bd))
                                 (if (= "CIRCLE" (cdr (assoc 0 (setq bx (entget bd)))))
                                       (setq bl (cons (trans (cdr (assoc 10 bx)) (cdr (assoc 210 bx)) 0) bl))
                                 )
                               )
                               (setq cl (cons (cons bn bl) cl))
                               bl
                           )
                           (tblobjname "block" bn)
                     )
                   )
               )
               (entmake
                   (list
                      '(0 . "POINT")
                     (cons 10 (mapcar '+ (mxv (car ml) pt) (cadr ml)))
                   )
               )
         )
       )
   )
   (princ)
)
页: 1 [2]
查看完整版本: 需要Lisp:将节点放置在cen