Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with repeat insert using grread?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
mid-awe
429 Views, 3 Replies

Help with repeat insert using grread?

Hi all,

 

I have a program that I've been using for some many years and I'm hoping to make a change that could improve it's usage.

 

My program simply inserts a block and increments a number held by an attribute; no big deal. I have a while loop that continues until the Right-Mouse-Button is clicked. The problem is that I have to click the Left-Mouse-Button twice everytime I want to insert. Is the double click really necessary? Can it be eliminated and reduced to a single mouse-click to insert, and, still exit with the Right-Mouse-Button click.

 

Here is what I have:

 

(SETQ CNUM 1)
(WHILE (/= (CAR (GRREAD nil 4 1)) 25) (PROGN (COMMAND "-INSERT" "CIRCNUM" pause 1 0 (ITOA CNUM)) (SETQ CNUM (1+ CNUM)) ) (PRINC "\n\t !> RIGHT-MOUSE-CLICK to exit : ") )

 Thank you in advance for any suggestions.

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: mid-awe

 Why not just

 


(WHILE (setq pt (getpoint "\nSpecify insertion point or right-mouse-click to exit:")) (COMMAND "-INSERT" "CIRCNUM" pt 1 0 (ITOA CNUM)) (SETQ CNUM (1+ CNUM)) )

Henrique

 

 

EESignature

Message 3 of 4
mid-awe
in reply to: hmsilva

Henrique =D You are awesome!!

That is the most simple solution ever. ( I must love over-thinking problem solutions. )

Thank you so much.
Message 4 of 4
hmsilva
in reply to: mid-awe

You're welcome, mid-awe

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost