也许:
- (setq a
- (
- (lambda ( / b i ) (setq i 0)
- (mapcar
- '(lambda (x)
- (if (= (car x) "Circle")
- (if b (cons (strcat "Circle-" (itoa (setq i (1+ i)))) (cdr x))
- (progn (setq b t) x)
- )
- x
- )
- ); lambda
- '(
- ("Circle" "6" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("Circle" "5" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("Circle" "4" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("Circle" "3" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("Circle" "2" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("Circle" "1" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("different name" "3" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("other name" "2" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- ("name" "1" (-3.06162e-017 -0.5 0.0) 1.0 10 (0.0 0.0 0.0))
- )
- )
- )
- )
- )
|