Alter .lsp to work with icad?
Posted: Sat Jul 24, 2021 10:41 pm
Can anyone fine tune this to work in IntelliCAD? It works great in Autocad. It's for imprinting multiple entities onto 3d solid faces. Thanks! - Quan?
Code: Select all
(defun c:mulimp (/ a ans b itm num ss ss1)
(if (and (princ "\nSelect a 3D solid or surface: ")
(setq ss (ssget "_+.:E:S:L" '((0 . "3DSOLID,*SURFACE"))))
(princ "\nSelect objects to imprint: ")
(setq ss1 (ssget "_:L" '((0 . "ARC,CIRCLE,LINE,*POLYLINE,ELLIPSE,SPLINE,REGION,3DSOLID"))))
(progn
(initget "Y N")
(setq ans (cond ((getkword "\nDelete entities? [N Y] <N>: "))
("N")
)
)
)
)
(progn
(setq itm 0
num (sslength ss1)
)
(command "_.imprint" (setq a (ssname ss 0)))
(while (< itm num)
(if (not (eq a (setq b (ssname ss1 itm))))
(command b (strcat "_" ans))
)
(setq itm (1+ itm))
)
(command "")
)
)
(princ)
)
; with Y or N choice
;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/imprint-multiple-objects/td-p/5496030