夏生生 发表于 2021-8-31 16:00:10

发码养号之entmake block attrib insert

收币有风险,下载需谨慎,勿喷

本附件含4个函数
make-block创建块定义
make-attdef创建属性定义
make-insert创建普通块(insert)
make-attinsert创建属性块(insert)

以下为示例
;;;插入普通块1234
(defun c:tt1 (/ n enl)
(if (null (tblsearch "BLOCK" "1234"))
    (progn (repeat (setq n 5)
       (setq enl
      (cons
          (entmakex(list '(0 . "line")
            (list 10 (setq n (1- n)) 0)
            (list 11 n 4)
      )
          )
          enl
      )
       )
   )
   (make-block "1234" '(0 0 0) enl)
    )
)
(make-insert "1234" (getpoint) 500 500 500 0)
)
;;;插入属性块12345
(defun c:tt2 (/ n enl)
(if (null (tblsearch "BLOCK" "12345"))
    (progn (setq enl (list (entmakex '((0 . "line") (10 -1 -1) (11 1 -1)))
         (make-attdef
         '(0 0) '(0 0) "A"    "A"   "A"1
         1      0   "STANDARD"   12
         0
          )
         )
   )
   (make-block "12345" '(0 0 0) enl)
    )
)
(make-attinsert
    "12345"
    (getpoint)
    500
    500
    500
    0
    (list (cons "A" "10"))
)
)




LIULISHENG 发表于 2021-8-31 18:10:47

做得太好了

paulpipi 发表于 2021-9-1 11:41:24

向你学习,天天向上

yanhongguang202 发表于 2022-8-27 18:26:57

下载一下,学习学习

boboxiake 发表于 2022-11-30 14:16:20

66666666

页: [1]
查看完整版本: 发码养号之entmake block attrib insert