woodman78 发表于 2022-7-6 08:45:53

现场放样信息

是否有人创建了lisp以生成放样信息?
 
我们通常将块复制到图形中,并在屏幕上对其编号。然后我们绘制一条连接它们的pline,并列出pline以将坐标复制到Excel。我们通常会将标有编号的图纸pdf发送到现场。
 
有谁能提供一个更好的建议,我们可以怎么做?

Organic 发表于 2022-7-6 08:50:17

比如在哪里放置偏置销钉等?难道你不能只导出放样点的坐标(从AutoCad或任何其他civil/survey软件包),而这就是放样作业所需的全部内容吗?

woodman78 发表于 2022-7-6 08:53:40

我有一个块,我用LeeMac非常酷的NumInc3.1插入一个增量数字的块。我想知道如何根据递增的数字列出某个名称的所有块的X,Y?或者有人已经有什么可以做这件事了吗?我看了李的PointManager,但它似乎是为我想要的相反设计的。
 
谢谢

woodman78 发表于 2022-7-6 08:58:39

我找到了这条线索,它几乎把我带到了我想去的地方。
http://www.cadtutor.net/forum/showthread.php?31653-点到excel工作表的Lisp坐标-%28点编号%29
如果我用多行文字放置点,效果很好,因为它检测到文字,我可以在excel中对其排序。我的问题是如何在CAD中对它们进行编号
如果我插入这样的块,插入时会爆炸,留下红色符号,这是一个块和多行文字,我如何通过选择它们将“x”转换为数字。有人可以创建一个lisp,当我选择文本时,它将变为1,而我选择的下一个将变为2,等等。?
 
对不起,我;我在这方面做得很好,但我有很多图纸要做,所以我正在寻找解决方案。

eldon 发表于 2022-7-6 09:00:24

 
您是否尝试过使用AutoCAD属性提取?您有一个属性为数字的块。属性提取将在数字上添加插入点坐标,以生成一个非常好的csv文件

Lee Mac 发表于 2022-7-6 09:03:55

写这篇文章很有趣,也许会有所帮助:
 
(defun c:test ( / block def el en ent file in lst pt ss str tag tags val )
   (while
       (not
         (or
               (eq "" (setq block (getstring t "\nBlock Name to Extract: ")))
               (and
                  (setq def (tblsearch "BLOCK" block))
                  (= 2 (logand 2 (cdr (assoc 70 def))))
               )
         )
       )
       (princ "\nBlock not Attributed or not Found.")
   )

   (if (not (eq "" block))
       (if
         (setq ss
               (ssget "_X"
                   (list
                     (cons 0 "INSERT")
                     (cons 2 block)
                     (cons 66 1)
                     (cons 410 (if (= 1 (getvar 'CVPORT)) (getvar 'CTAB) "Model"))
                   )
               )
         )
         (progn
               (setq ent (tblobjname "BLOCK" block))
               (while (setq ent (entnext ent))
                   (if (eq "ATTDEF" (cdr (assoc 0 (entget ent))))
                     (setq tags (cons (strcase (cdr (assoc 2 (entget ent)))) tags))
                   )
               )
               (while
                   (not
                     (member
                           (setq tag
                               (strcase
                                 (cond
                                       (   (eq ""
                                             (setq tag
                                                   (getstring
                                                       (strcat "\nTag to Sort by <" (last tags) ">: ")
                                                   )
                                             )
                                           )
                                           (last tags)
                                       )
                                       (   tag   )
                                 )
                               )
                           )
                           tags
                     )
                   )
                   (princ "\nAttribute not found in Block.")
               )
               (if (setq file (getfiled "Output File" "" "txt;csv" 1))
                   (progn
                     (repeat (setq in (sslength ss))
                           (setq en (ssname ss (setq in (1- in)))
                                 pt (cdr (assoc 10 (entget en)))
                                 val nil
                           )
                           (while
                               (and
                                 (null val)
                                 (eq "ATTRIB"
                                       (cdr
                                           (assoc 0
                                             (setq el
                                                   (entget
                                                       (setq en (entnext en))
                                                   )
                                             )
                                           )
                                       )
                                 )
                               )
                               (if (eq (strcase (cdr (assoc 2 el))) tag)
                                 (setq val (cdr (assoc 1 el)))
                               )
                           )
                           (if val
                               (setq lst (cons (cons val pt) lst))
                           )
                     )
                     (if (setq file (open file "w"))
                           (progn
                               (foreach line (vl-sort lst '(lambda ( a b ) (< (atof (car a)) (atof (car b)))))
                                 (setq str (car line))
                                 (foreach x (cdr line)
                                       (setq str (strcat str "," (rtos x)))
                                 )
                                 (write-line str file)
                               )
                               (setq file (close file))
                           )
                           (princ "\nUnable to Open Chosen File.")
                     )
                   )
                   (princ "\n*Cancel*")
               )
         )
         (princ "\nNo Blocks Found.")
       )
   )
   (princ)
)

woodman78 发表于 2022-7-6 09:06:41

非常酷的LeeMac。谢谢关于NumInc3.1的一个问题是,当我在块上设置osnap时,块不会捕捉到一条直线。我做错什么了吗?

Lee Mac 发表于 2022-7-6 09:10:08

 
对象捕捉(以及所有其他标准AutoCAD功能,如跟踪等)在“动态模式”下不可用(由于grread循环)。
 
这应该在动态模式描述中描述。

woodman78 发表于 2022-7-6 09:11:42

好的,谢谢。

BIGAL 发表于 2022-7-6 09:15:29

李像往常一样做得很好,但运行第二步,将它们从csv中带回来,放置在图纸中,以便在现场进行硬拷贝查看。
 
如果你想要代码,只要问。
页: [1] 2
查看完整版本: 现场放样信息