nithink55 发表于 2022-7-5 23:53:22

ucs-programming

(defun c:ucsmen()
(setq pt1 (getpoint "\npick new orgin"))
(setq Pt2 (getpoint "second point") )
(setq Pt3 (getpoint "third point" ) )
(command "_ucs""3"Pt1 Pt2 Pt3 )
)   
 
 
i am new to autolisp..the error coming after loading is "ucsmen Unknown command "UCSMEN".Press F1 for help."
 
this lisp is to set ucs by clicking on screen
please help.
 
thanks in advance

Tharwat 发表于 2022-7-6 00:09:59

Try this ...
 

(defun c:ucsmen (/ pt1 pt2 pt3) (if (and (setq pt1 (getpoint "\n pick new orgin :"))          (setq Pt2 (getpoint "\n second point :" pt1))          (setq Pt3 (getpoint "\n third point :" pt2))   )   (command "_ucs" "3" "_none" Pt1 "_none" Pt2 "_none" Pt3) ) (princ))

nithink55 发表于 2022-7-6 00:23:41

thanks its working

Tharwat 发表于 2022-7-6 00:42:41

 
You're welcome anytime .

SLW210 发表于 2022-7-6 00:53:45

Please read the Code posting guidelines and edit your post to include the Code in Code Tags.
页: [1]
查看完整版本: ucs-programming