Jump to content

Recommended Posts

Posted

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

Posted

The other six parameters are static? No user input required?

Posted

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.

Posted

Perhaps setting variabel "ATTREQ" to 0, then altering the atts afterwards?

Posted

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 "" "" "" "" "")

Posted
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 :)

Posted

thanks, not bad considering I didn't look up anything. :D

 

The INSERT needs a position too but the idea is there.

Posted

The value changes virtualy everytime the block is inserted. The block is inserted on average say, 12 times an hour.

Posted

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.

Posted

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.

Posted

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 :P

Posted
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)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...