Waiting for user input
Waiting for user input
(OP)
Hi Everybody!
I am working on an Autocad project and I would like to get information about how can I do the example above:
I would like to write a script (only script, I don't want to use blocks), that if I run waits for a point which is specified by the user and after that from that point the script draws a rectangle. I looked after it in the turorial and i found infos about a special character for it called "\" but it didn't worked.
it is important for me that if the user run the script be an opportunity to pick a user point.
If you have any idea please write down.
Thank you,
Bye,
George
I am working on an Autocad project and I would like to get information about how can I do the example above:
I would like to write a script (only script, I don't want to use blocks), that if I run waits for a point which is specified by the user and after that from that point the script draws a rectangle. I looked after it in the turorial and i found infos about a special character for it called "\" but it didn't worked.
it is important for me that if the user run the script be an opportunity to pick a user point.
If you have any idea please write down.
Thank you,
Bye,
George





RE: Waiting for user input
you can't use a script, if you want to select objects, points, etc...
But you can customize a button-macro like
CODE
Lothar
ADT 2004
ACAD 2002
RE: Waiting for user input
There is a function "getpoint" which will expect a point from the user. In a lisp you could do something like,
(setq p1 (getpoint "\nPick point:"))
The text pick point will be on the command line. There is a bit more involed than just this, so you should do some research on writing lisps.