Over 1.099.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
Try the new precise Engineering calculator.
New AutoCAD 2026 commands and variables.
Discussion forum
?CAD discussions, advices, exchange of experience

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
|
Post Reply ![]() |
Author | |
kameron1967 ![]() Groupie ![]() Joined: 30.Jan.2011 Location: United States Using: autocad 2018 Status: Offline Points: 29 |
![]() Posted: 31.Jan.2011 at 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}
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,094 seconds.