GetPoint and GetString

GetPoint and GetString

Anonymous
Not applicable
344 Views
4 Replies
Message 1 of 5

GetPoint and GetString

Anonymous
Not applicable
I am trying to find a way where I can allow the user to pick a point, or enter it in the command line; similar to the offset command

"Specify offset distance or [Through/Erase/Layer] <1.0000>:"

Can this be done?

Thanks
Brent
0 Likes
345 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Yes.

Look into:
InitializeUserInput & Keywords
GetDistance & Keywords
Checking for Keyword being entered
GetPoint if the Keyword is Through



"BrentB" wrote in message news:5841144@discussion.autodesk.com...
I am trying to find a way where I can allow the user to pick a point, or
enter it in the command line; similar to the offset command

"Specify offset distance or [Through/Erase/Layer] <1.0000>:"

Can this be done?

Thanks
Brent
0 Likes
Message 3 of 5

Anonymous
Not applicable
wrote in message news:5841144@discussion.autodesk.com...
I am trying to find a way where I can allow the user to pick a point, or
enter it in the command line; similar to the offset command

"Specify offset distance or [Through/Erase/Layer] <1.0000>:"

Can this be done?

Thanks
Brent

interestingly enough, the answer is in your subject line
GetPoint

from the help(of all places )
RetVal = GetPoint([Point][, Prompt])
The AutoCAD user can specify the point by entering a coordinate in the
current units format; The user can specify the point also by specifying a
location on the graphics screen.

course your question was on getPoint but your example was GetDistance so ???

hth
mark
0 Likes
Message 4 of 5

Anonymous
Not applicable
This is how it works for getreal. getpoint would be the same, you just need
to code for the previous point picked to be the default.

On Error GoTo inputenter
If setelev > -9999 Then
rtmp = ThisDrawing.Utility.GetReal("Enter Elevation <" &
Format(setelev) & "> : ")
Else
rtmp = ThisDrawing.Utility.GetReal("Enter Elevation : ")
End If
On Error GoTo 0
setelev = rtmp
'other bit of code
..
..
Exit Sub
inputenter:
If UCase(Err.Description) = "USER INPUT IS A KEYWORD" Then ' I don't do
any checking here, just that if they press enter
rtmp = setelev
Err.Clear
Resume Next
End If
end sub

Jon
www.stringersurvey.com


wrote in message news:5841144@discussion.autodesk.com...
I am trying to find a way where I can allow the user to pick a point, or
enter it in the command line; similar to the offset command

"Specify offset distance or [Through/Erase/Layer] <1.0000>:"

Can this be done?

Thanks
Brent
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thanks Jeff

Just what I was looking for!!
0 Likes