做一个销孔 ,加载没反应,该怎么修改呢
;;做一个销孔(defun c:fs_dim_mkxk (/ cen hatch obj r ss)
(princ "\n选择要生成销孔的圆:")
(setq ss (ssget ":S" '((0 . "circle,arc"))))
(or ss (fsxm-silenceexit))
(foreach en (fsxm-ss->enlist ss)
(entmake
'((0 . "HATCH")
(100 . "AcDbEntity")
(67 . 0)
(8 . "Hatch")
(62 . 1)
(100 . "AcDbHatch")
(10 0.0 0.0 0.0)
(210 0.0 0.0 1.0)
(2 . "SOLID")
(70 . 1)
(71 . 0)
(91 . 2)
(92 . 7)
(72 . 1)
(73 . 1)
(93 . 3)
(10 0.0 1.0 0.0)
(42 . 0.0)
(10 0.0 0.0 0.0)
(42 . 0.0)
(10 1.0 0.0 0.0)
(42 . 0.414214)
(97 . 0)
(92 . 7)
(72 . 1)
(73 . 1)
(93 . 3)
(10 0.0 0.0 0.0)
(42 . 0.0)
(10 -1.0 0.0 0.0)
(42 . 0.414214)
(10 0.0 -1.0 0.0)
(42 . 0.0)
(97 . 0)
(75 . 0)
(76 . 1)
(47 . 0.0036759)
(98 . 2)
(10 0.415316 0.296747 0.0)
(10 -0.49285 -0.320804 0.0)
(450 . 0)
(451 . 0)
(460 . 0.0)
(461 . 0.0)
(452 . 1)
(462 . 1.0)
(453 . 2)
(463 . 0.0)
(63 . 5)
(421 . 255)
(463 . 1.0)
(63 . 7)
(421 . 16777215)
(470 . "LINEAR")
)
)
(setq hatch (vlax-ename->vla-object (entlast)))
(setq obj (vlax-ename->vla-object en))
(setq cen (vla-get-Center obj))
(setq r (vla-get-Radius obj))
(vla-move hatch (vlax-3d-point '(0 0)) cen)
(vla-ScaleEntity hatch cen r)
)
(c:fs_dim_mkxk)
(princ)
)
这个需要飞诗函数才行 ;;;飞诗的函数
(defun fsxm-ss->enlist (ss / lst n en)
(setq n -1)
(while (setq en (ssname ss (setq n (1+ n))))
(setq lst (cons en lst))
)
) Thanks for sharing ^^ yoyoho 发表于 2019-1-24 18:15
;;;飞诗的函数
(defun fsxm-ss->enlist (ss / lst n en)
(setq n -1)
哪这个加在哪个位置呢
页:
[1]