Tharwat 发表于 2022-7-6 11:04:00

但是
这似乎行得通。

(setq stamp1 "..\\..\\KOMP_FIL\\Stämpel\\STAMP\\_STAMP-1.dwg")

(command "-insert" stamp2 "0,0,0" "1" "1" "0" "" "" "" "" "" "" "" "" "" "")
)
)

au-s 发表于 2022-7-6 11:06:05

 
如果您选择该路线,则无需检查初始选择集。
如。

(defun test ()
(INSERT1)
(if (ssget "x" '((2 . "PNAMN-?")))
(progn
   
   
      (cond
   ( (ssget "x" '((2 . "PNAMN-1")))(STAMP_1) )
   ( (ssget "x" '((2 . "PNAMN-2"))) (STAMP_2) )
   ) ;if
   ) ;progn
) ;if
) ;defun
(princ)

au-s 发表于 2022-7-6 11:11:16

alanjt 发表于 2022-7-6 11:16:52

 
If you are going that route, there's no need to check the initial selection set.
eg.

(defun test (/) (INSERT1) (cond ((ssget "_X" '((2 . "PNAMN-1"))) (STAMP_1))       ((ssget "_X" '((2 . "PNAMN-2"))) (STAMP_2)) ))
页: 1 [2]
查看完整版本: wcmatch