没有解决方案对不起,只需更正您的内容(为了可读性):
- (defun c:test ( / *error* _GRP selfoo ent1 ent2 rad1 rad2 rad3 off1 off2 )
- (defun *error* (msg)
- (and msg
- (not (member msg '("Function cancelled" "quit / exit abort")))
- (princ (strcat "\nError: " msg))
- )
- (princ)
- )
- (defun _GRP ( msg / rtn ) ; "Get Real Positive"
- (and (not (initget (+ 1 2 4))) (setq rtn (getreal (strcat "\n" msg))) )
- rtn
- )
- (setq selfoo (lambda ( x ) (eq "LWPOLYLINE" (cdr (assoc 0 (entget (car x)))))))
- (if
- (and
- (setq ent1 (car (LM:SelectIf "\nSelect approach polyline: " selfoo entsel nil)))
- (setq ent2 (car (LM:SelectIf "\nSelect the intersecting pline: " selfoo entsel nil)))
- (setq rad1 (_GRP "Specify the approach radius: "))
- (setq rad2 (_GRP "Specify the center radius: "))
- (setq rad3 (_GRP "Specify the ending radius: "))
- (setq off1 (_GRP "Specify the approach offset: "))
- (setq off2 (_GRP "Specify the tie-in offset: "))
- ); and
- (progn
- ;;;This is where I am getting stuck
- )
- )
- (princ)
- )
- ;;---------------------=={ Select if }==----------------------;;
- ;; ;;
- ;; Provides continuous selection prompts until either a ;;
- ;; predicate function is validated or a keyword is supplied. ;;
- ;;------------------------------------------------------------;;
- ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;;
- ;;------------------------------------------------------------;;
- ;; Arguments: ;;
- ;; msg - prompt string ;;
- ;; pred - optional predicate function [selection list arg] ;;
- ;; func - selection function to invoke ;;
- ;; keyw - optional initget argument list ;;
- ;;------------------------------------------------------------;;
- ;; Returns: Entity selection list, keyword, or nil ;;
- ;;------------------------------------------------------------;;
- (defun LM:SelectIf ( msg pred func keyw / sel ) (setq pred (eval pred))
- (while
- (progn (setvar 'ERRNO 0) (if keyw (apply 'initget keyw)) (setq sel (func msg))
- (cond
- ( (= 7 (getvar 'ERRNO))
- (princ "\nMissed, Try again.")
- )
- ( (eq 'STR (type sel))
- nil
- )
- ( (vl-consp sel)
- (if (and pred (not (pred sel)))
- (princ "\nInvalid Object Selected.")
- )
- )
- )
- )
- )
- sel
- )
|