cabltv1 Posted February 12, 2009 Share Posted February 12, 2009 Please help! I have a routine that will update a block attribute from another block attribute. It works well and is quite versatile. Anyway, after selecting the source block the code asks to "Select Addresses" [see below]. At that point I have to type "CP" into the command window and hit the Enter key to select blocks with a polygon. I would like the code to go into the "CP" mode without me having to type it in. ;reset variables (setq tag_found nil) (setq setset nil) ; get end block (while (/= tag_found "true") (princ "\nSelect Addresses ")(princ (chr 34))(princ stag_end)(princ (chr 34)) (setq selset (ssget '((0 . "INSERT")))) Thanks for any help. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 12, 2009 Share Posted February 12, 2009 When asked to select hold left mouse buton down and Drag towards right is within window towards left is crossing window Quote Link to comment Share on other sites More sharing options...
cabltv1 Posted February 12, 2009 Author Share Posted February 12, 2009 I appreciate the response but that won't solve my problem. Normally, selections are oddly shapped. I need to just select the blocks that need updated. The selection may include 12 or more oddly shapped points. Quote Link to comment Share on other sites More sharing options...
PS_Port Posted February 12, 2009 Share Posted February 12, 2009 Do the blocks that need updating/matching have the same name? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted February 12, 2009 Share Posted February 12, 2009 Try (setq selset (ssget "_CP" '((0 . "insert")))) BTW... it's all there in Developer Help under ssget Quote Link to comment Share on other sites More sharing options...
CarlB Posted February 12, 2009 Share Posted February 12, 2009 No that doesn't work, if you use "cp" with ssget you need to supply a point list. I was thinking use (command "select" "cp" ....) then (ssget "p" etc.. but I couldn't get the "select" to end without user hitting "enter" so it doesn't save eliminate those dratted keystrokes Quote Link to comment Share on other sites More sharing options...
wprovost Posted February 12, 2009 Share Posted February 12, 2009 ;reset variables (setq tag_found nil) (setq setset nil) ; get end block (while (/= tag_found "true") (princ "\nSelect Addresses ") (princ (chr 34)) (princ stag_end) (princ (chr 34)) (command "select" "cp") (setq selset (ssget "p" '((0 . "INSERT")))) works though. It's kinda ugly. I would prefer personally to not have the select prompt vanish automatically anyway. Quote Link to comment Share on other sites More sharing options...
CarlB Posted February 12, 2009 Share Posted February 12, 2009 I had to add a "pause" to get it to work, as in: (command "select" "cp" pause) (setq selset (ssget "p" '((0 . "INSERT")))) Quote Link to comment Share on other sites More sharing options...
cabltv1 Posted February 12, 2009 Author Share Posted February 12, 2009 Well the code does stop and lets me polygon around the blocks but the code won't run past that point. I appreciate everyones help. I guess I will have to live with the original code. Thanks again. Quote Link to comment Share on other sites More sharing options...
CarlB Posted February 12, 2009 Share Posted February 12, 2009 The code keeps running for me, but only after a few "enters" after the select. Quote Link to comment Share on other sites More sharing options...
JohnM Posted February 12, 2009 Share Posted February 12, 2009 No matter what you do you will have to tell the program when to stop when making a crossing polygon because it could be 3 points or 300. if you don’t want to hit the enter key change your right click on the mouse to be enter. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.