马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×

- [FONT=courier new]
- (defun c:test (/ arrow lst pt pt1)
- (p-s '("osmode" 512
- "plinewid" 0
- "cmdecho" 0
- ) t
- )
- (setq arrow (vl-registry-read "HKEY_CURRENT_USER\\Software\\Autodesk\\THCAD"
- "arrow"
- )
- )
- (if arrow
- (setq arrow (ureal 7 "" "\n\t请输入箭头长度" (read arrow)))
- (setq arrow (ureal 7 "" "\n\t请输入箭头长度<--->" arrow))
- )
- (vl-registry-write "HKEY_CURRENT_USER\\Software\\Autodesk\\THCAD" "arrow"
- (rtos arrow)
- )
- (command "pline")
- (while (setq pt (getpoint (if pt
- pt
- (list 0 0 0)
- ) "\n\t請指定(折線)頂(端)點<回車退出>:"
- )
- )
- (setq lst (cons pt lst))
- (command pt)
- )
- (command "")
- (setq pt1 (polar (car lst) (angle (cadr lst) (car lst)) arrow))
- (command "pline" (car lst) "w" (/ arrow 2.8) 0 pt1 "")
- (p-e)
- )
- [/FONT]
|