- (load "xyp_lib.vlx") ;版本 V.20060327
- ;|下载和加载通用函数(可在签名栏直接下载后放到搜索路径下)
- 利用以下任何一种方式(首选第一种)即可加载和运行通用函数内的所有子程序:
- ★1·在acad.lsp中增加(load"xyp_lib.vlx")
- ■2·在每个程序内增加(load"xyp_lib.vlx")
- ■3·在command下,输入(load"xyp_lib.vlx")
- ■4·在菜单.mnl中增加(load"xyp_lib.vlx")
- ■5·将xyp_lib.vlx文件直接拽到cad屏幕
- [COLOR=red] ★通用函数下载地址:[/COLOR]
- [url]http://www.xdcad.net/forum/attachment.php?s=&postid=1606661[/url]
- |;
- ;;;xxjx(斜向矩形)
- (defun c:xxjx ()
- (cmdla0)
- (command "ucs" "")
- (prompt "\n两点确定斜向角度: ")
- (while (not (Setq pt1 (getpoint "\n起点: "))))
- (while (not (Setq pt2 (getpoint pt1 "\n下一点: "))))
- (setq ang1 (* 180 (/ (angle pt1 pt2) PI)))
- (command "ucs" "z" ang1)
- (while (Setq pt1 (getpoint "\n斜方块起点<退出>: "))
- (if (Setq pt2 (getcorner pt1 "\n斜方块对角点<重设起点>: "))
- (command "rectang" pt1 pt2)
- )
- )
- (command "ucs" "")
- (cmdla1)
- )
|