把对象插入到指定坐标的位置
如何将图片中红圈中的对象图例加入到指定坐标的位置中,谢谢,新手,希望各位大侠指点。
entmake生成普通块
(defun emkblk (ss pt name / i)
(entmake (list '(0 . "block") (cons 2 name) '(70 . 0) (cons 10 pt)))
(repeat (setq i (sslength ss)) (entmake (cdr (entget (ssname ss (setq i (1- i)))))))
(entmake '((0 . "ENDBLK")))
(command "_.erase" ss "")
(entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
)
entmake插入普通块
(entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
entmake生成无名块
(defun emkunameblk (ss pt / i name)
(entmake (list '(0 . "block") '(2 . "*U") '(70 . 1) (cons 10 pt)))
(repeat (setq i (sslength ss)) (entmake (cdr (entget (ssname ss (setq i (1- i)))))))
(setq name (entmake '((0 . "ENDBLK"))))
(command "_.erase" ss "")
(entmake (list '(0 . "INSERT") (cons 2 name) (cons 10 pt)))
name
)希望这三个函数能够帮到你。
首先感谢这位大侠,但我看不懂啊,我是用C#做的,能帮我转换一下吗,我才学2天
页:
[1]