虽然您的代码中存在一些问题,但上述错误似乎表明您的代码没有正确加载。
我做了一些修改并发表了评论:
- (defun c:ucsmen( [color=red]/ pt1 pt2 pt3[/color] ) [color=blue];localize the variables - no conflict with other functions[/color]
- [color=red] (if (and [/color](setq pt1 (getpoint "\npick new orgin")) [color=blue];ensure right input[/color]
- (setq Pt2 (getpoint "[color=red]\n[/color]second point")) [color=blue];print each prompt on its own line (clearer)[/color]
- (setq Pt3 (getpoint "[color=red]\n[/color]third point" ))[color=red])[/color]
- (command "_ucs" "3" [color=red]"_non"[/color] Pt1[color=red] "_non"[/color] Pt2 [color=red]"_non"[/color] Pt3 ) [color=blue];ensure no conflict with active OSNAP[/color]
- [color=red])[/color]
- [color=red] (princ) [/color] [color=blue];exit silent[/color]
- )
此外,请编辑您的帖子并添加所需的代码标签。个人观点,但这篇文章更适合在AutoLISP子论坛。 |