选择所有修剪
大家好,非常棒的AutoCAD人员!我想知道是否有人有一个lisp例程,在使用trim命令时会自动选择all?
i、 输入trim命令,而不是再次按enter键全选,而是运行一个lisp例程来自动执行该操作?
任何帮助都将不胜感激!
非常感谢。 像这样的*未经测试*
(command "._trim" "")
目前正在做一些事情,选择普林线,选择边,修剪所有,非常接近,为另一个职位。
还有Cookiecutter。也许是lsp? 试试看,它使用一条线作为刀刃,只用两个镐就可以沿着线走一圈。
(defun c:trpls ( / x pt2 obj obj2 co-ords)
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)
(setq x -1)
(setq obj (car (entsel "Pick cut line")))
(setq pt2 (getpoint "pick offset direction"))
(command "_offset" 1 obj pt2 "")
(if (not co-ords2xy)(load "pline co-ords2"))
(setq obj2 (entlast))
(setq co-ords (getcoords obj2))
(co-ords2xy) ; list of 2d points making pline
(entdel obj2)
(command "_TRIM" OBJ "" "F")
(while (= (getvar "cmdactive") 1 )
(repeat (length co-ordsxy)
(command(nth (setq x (+ x 1)) co-ordsxy))
)
(command "")
)
(setq co-ordsxy nil) ; for next time
)
页:
[1]