Show full version of the posting: Condition PROGN statement help

kameron1967
31.01.2011, 20:08
Can someone please look at this and help me do a condition ?
 
Basically, I want the program to decide if it's border1(zi3042sht) OR border #2 (i3042sht) and perform actions depending on which border it find.  Thank you, thank you, thank you!
 
[code](if (setq ss (ssget "x" (list (cons 0 "INSERT") (cons 2 "zi3042sht"))))    (PROGN(vla-put-Name  (vla-item    (vla-get-Blocks      (vla-get-ActiveDocument        (vlax-get-acad-object)      )    )  "zi3042sht") ;;;<-- old block name"abcde") ;;;< -- new block name)(if (setq B3Set (ssget "x" '((0 . "INSERT")(2 . "abcde"))))       (progn            (setq ename1 (ssname B3Set 0))            (setq InsPt (cdr (assoc 10 (entget ename1))))          (command "._move" "all" "" InsPt '(0.0 0.0)); (command "._move" "all" "" "0,0" "@2.06155<194")))     )    (PROGN  (if (setq ss (ssget "x" (list (cons 0 "INSERT") (cons 2 "i3042sht"))))(vla-put-Name  (vla-item    (vla-get-Blocks      (vla-get-ActiveDocument        (vlax-get-acad-object)      )    )  "i3042sht") ;;;<-- old block name"abcde") ;;;< -- new block name)
(if (setq B3Set (ssget "x" '((0 . "INSERT")(2 . "abcde"))))       (progn            (setq ename1 (ssname B3Set 0))            (setq InsPt (cdr (assoc 10 (entget ename1))))            (command "._move" "all" "" InsPt '(0.0 0.0)) (command "._move" "all" "" "0,0" "@2.06155<194")))    ));end of IF
[\code}