马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - (defun XD::DiaLog:SLB2SLDNAMES (path / ex n id app
- appstr namestr nth1 nth2 nth3
- nth4 nth5 chklist
- )
- (setq app nil
- n 0
- )
- (setq id (open path "r"))
- (read-line id)
- (setq ex (read-char id))
- (setq app (read-line id))
- (setq app (vl-remove 'nil (vl-string->list app)))
- (while (and (/= 101 (last app))
- (read-char id)
- (setq ex (read-line id))
- )
- (setq app
- (append app
- (cons 1 (cons 1 (vl-remove 'nil (vl-string->list ex))))
- )
- )
- )
- (close id)
- (setq app (cdr (cdr app)))
- (setq app (cons 1 (cons 1 app)))
- (foreach x app
- (cond
- ((and (< 0 x) (not nth1)) (setq nth1 x))
- ((and nth1 (not nth2)) (setq nth2 x))
- ((and nth2 (not nth3)) (setq nth3 x))
- ((and nth3 (not nth4)) (setq nth4 x))
- ((and nth4 (not nth5)) (setq nth5 x))
- )
- (if (and nth1 nth2 nth3 nth4 nth5)
- (if (and (< 0 nth1) (< 0 nth2) (< 0 nth5) (= 0 nth4))
- (if (/= x 0)
- (setq namestr (append namestr (list x)))
- (setq appstr (append appstr (list namestr))
- namestr nil
- nth1 nil
- nth2 nil
- nth3 nil
- nth4 nil
- nth5 nil
- )
- )
- (setq nth1 nil
- nth2 nil
- nth3 nil
- nth4 nil
- nth5 nil
- )
- )
- )
- )
- (acad_strlsort (mapcar 'vl-list->string appstr))
- )
|