cabltv1 Posted January 29, 2009 Posted January 29, 2009 Please help! I have a block I am inserting into a drawing that has 7 attributes. I need it to pause on the first attribute for user input (key in numbers into the command line) and then by-pass the other 6 attributes and run code past the inserted block. Below is what I have... (command "-insert" "C:rf_strnd" "s" "1" pause pause "") Thanks Quote
ReMark Posted January 29, 2009 Posted January 29, 2009 The other six parameters are static? No user input required? Quote
cabltv1 Posted January 29, 2009 Author Posted January 29, 2009 Let me explain further. If I turn on the Dialog box ("setvar" 1) bfore inserting the block, all is well. I want to turn it off before the block insert (command "setvar" 0) so I can just enter the first attributes information and skip the other 6 attributes. I have code after the insert. If I turn off the Dialog box before insert, the code past the insert fills out the 6 attributes and then the function stops. Quote
Lee Mac Posted January 29, 2009 Posted January 29, 2009 Perhaps setting variabel "ATTREQ" to 0, then altering the atts afterwards? Quote
dbroada Posted January 29, 2009 Posted January 29, 2009 rather than put a pause into the command why not get its value beforehand? Something like (Lee can correct me here - I don't do LISP) (getstring "What Value?" myValue) (command "-insert" "C:rf_strnd" "s" "1" !myValue "" "" "" "" "") Quote
Lee Mac Posted January 29, 2009 Posted January 29, 2009 rather than put a pause into the command why not get its value beforehand? Something like (Lee can correct me here - I don't do LISP) (getstring "What Value?" myValue) (command "-insert" "C:rf_strnd" "s" "1" !myValue "" "" "" "" "") haha, nice try Dave, but yes I will correct you: (setq myValue (getstring t "\nWhat Value? ")) (command "-insert" "C:ft_strnd" "s" "1" myValue "" "" "" "" "") Not sure about the order of command prompts for the insert command, will have to check that, but attribute retrieval should be ok for that Quote
dbroada Posted January 29, 2009 Posted January 29, 2009 thanks, not bad considering I didn't look up anything. The INSERT needs a position too but the idea is there. Quote
Lee Mac Posted January 29, 2009 Posted January 29, 2009 Yeah, it was a good attempt - you almost had it. Quote
cabltv1 Posted January 29, 2009 Author Posted January 29, 2009 The value changes virtualy everytime the block is inserted. The block is inserted on average say, 12 times an hour. Quote
dbroada Posted January 29, 2009 Posted January 29, 2009 so what is the difference in asking for the value before inserting the block and actually inserting the block? You still have to give the value 12 times an hour. Quote
cabltv1 Posted January 29, 2009 Author Posted January 29, 2009 I did not look at your code close enough. I tried it your way but code past the block insertion filled out other attributes in the block. I added 2 pauses and an extra "" at the end and it works perfectly. (command "-insert" "C:/rf_strnd" "s" "1" pause pause myValue "" "" "" "" "" ""). Thanks for your help! This will make my life a little easier. Quote
Lee Mac Posted January 30, 2009 Posted January 30, 2009 I agree with Dave to be honest - unless there is a systematic fashion in which you enter the attribute for this block, there is no way in getting around the actual entering of the value whichever way you look at it Quote
dbroada Posted January 30, 2009 Posted January 30, 2009 I did not look at your code close enough.I tried it your way but code past the block insertion filled out other attributes in the block. I added 2 pauses and an extra "" at the end and it works perfectly. (command "-insert" "C:/rf_strnd" "s" "1" pause pause myValue "" "" "" "" "" ""). Thanks for your help! This will make my life a little easier. I have to admit I didn't realise the pauses were for insertion point. I normally get all the information BEFORE issuing a COMMAND so that it ends up as (command "-insert" block_name P1 myAngle myValue "" "" "" "" "" "") (you don't need the scale 1 bit) Quote
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.