I've done plenty of lisp... but for some reason I am drawing a BIG blank...
The prompts below is what I want... expected imput from the user is a point (to locate the 3/8th size in this case) or different size.
... if the user enters 1/2 for example, then the 1/2 size is floating on the cursor and prompting for a point.
HELP please!
Specify a point, or size <3/8>: 1/2
Specify a point, or size <1/2>:
Solved! Go to Solution.
Solved by 3wood. Go to Solution.
One way
(or ans (setq ans "3/8")) (setq flag t) (while flag (initget "3/8 1/2") (setq ans (setq p1 (getpoint (strcat "\nSpecify a point, or size [" ans "] <exit>: ")))) (cond ((= 'list (type ans)) (prompt "\nUser have chosen a point... ") (setq flag nil) ) ((wcmatch ans "3/8,1/2") (prompt "\nUser did enter a size...") ) ((= ans nil) (setq flag nil) (prompt "\nUser want to exit...") ) ) )
Henrique
Sorry... I wasn't quite clear I guess...
I want the 3/8 th sized object to be floating on the cursor at the prompt... if the user types 1/2 then the 1/2 sized object would be floating on the cursor.
Specify a point, or size <3/8>:
@mdhutchinson wrote:
...
The prompts below is what I want... expected imput from the user is a point (to locate the 3/8th size in this case) or different size.
... if the user enters 1/2 for example, then the 1/2 size is floating on the cursor and prompting for a point.
....
Specify a point, or size <3/8>: 1/2
Specify a point, or size <1/2>:
Is this about Inserting a Block representing the 1/2- or 3/8-size version of something? I think that would make it more complicated. It would need to be in an Insert command for the Block image to be "floating on the cursor," and if the User enters a different size, it would need to cancel the current Insert command, and start another using the new size's Block name. That part probably isn't too hard, but the big problem I see is that if it's asking for an insertion point from inside a (getpoint) function, the dynamic image of the Block will not be "floating on the cursor" as it will be if the Insert command's prompt is what's doing the asking. I'm not sure whether there's any way around that.
The quickest way: Just drag different sized blocks into a tool palette to create different tools.