Keyboard entry OR graphical selection

Keyboard entry OR graphical selection

Anonymous
Not applicable
248 Views
4 Replies
Message 1 of 5

Keyboard entry OR graphical selection

Anonymous
Not applicable
I'm writing a routine that, by default, prompts the user to enter a real
value. I would also like to give the user the ability to type "G", or
something, and be able to graphically select a point on the screen. I'm
currently using "thisdrawing.utility.getreal("Enter station: ") but how do I
modify it to accept an response like "G" and then issue another prompt for
the graphical selection? Thanks, Scott
0 Likes
249 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Just off the cuff [no testing], I would look at the InitializeUserInput
and GetKeyword methods.

Joe

"Scott" wrote in message news:EC7A923A596FE7F8A37B0B7792263179@in.WebX.maYIadrTaRb...
> I'm writing a routine that, by default, prompts the user to enter a real
> value. I would also like to give the user the ability to type "G", or
> something, and be able to graphically select a point on the screen. I'm
> currently using "thisdrawing.utility.getreal("Enter station: ") but how do I
> modify it to accept an response like "G" and then issue another prompt for
> the graphical selection? Thanks, Scott
>
>
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
"Scott" wrote in message
news:EC7A923A596FE7F8A37B0B7792263179@in.WebX.maYIadrTaRb...
> I'm writing a routine that, by default, prompts the user to enter a real
> value. I would also like to give the user the ability to type "G", or
> something, and be able to graphically select a point on the screen. I'm
> currently using "thisdrawing.utility.getreal("Enter station: ") but how do
I
> modify it to accept an response like "G" and then issue another prompt for
> the graphical selection? Thanks, Scott

You can just skip the "G" option, and just use GetDistance()
instead of GetReal(). GetDistance() lets you to specify the
distance by entering a real number, or by picking two points.
0 Likes
Message 4 of 5

Anonymous
Not applicable
That's good to know but I need to specify either a real number (a station
value) or graphically select a location (xyz) that will then be converted to
station & offset values

Thanks,
Scott


"Tony Tanzillo" wrote in message
news:C53593B2F9B3BB143F09D36869481C39@in.WebX.maYIadrTaRb...
> "Scott" wrote in message
> news:EC7A923A596FE7F8A37B0B7792263179@in.WebX.maYIadrTaRb...
> > I'm writing a routine that, by default, prompts the user to enter a real
> > value. I would also like to give the user the ability to type "G", or
> > something, and be able to graphically select a point on the screen. I'm
> > currently using "thisdrawing.utility.getreal("Enter station: ") but how
do
> I
> > modify it to accept an response like "G" and then issue another prompt
for
> > the graphical selection? Thanks, Scott
>
> You can just skip the "G" option, and just use GetDistance()
> instead of GetReal(). GetDistance() lets you to specify the
> distance by entering a real number, or by picking two points.
>
>
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
Look into the GetXX class by Jacob Dinardi. You may have to modify it a little
for your particlar needs, but it will work. As Joe said, think about using
InitializeUserInput. If you set the bits argument to 128 the getpoint method
will accept either input, keyboard or graphic selection. This get you around
having to use the 'G' option to tell the program you want a graphical
selection. I have used this sort of routine where the user can select a
location on the screen or input a 'point number' where the coordinates are read
from a database.
If the 'G' option does not bother you, then combine InitializeUserInput and
GetKeyword.
Tom Craft

Scott wrote:

> That's good to know but I need to specify either a real number (a station
> value) or graphically select a location (xyz) that will then be converted to
> station & offset values
>
> Thanks,
> Scott
>
> "Tony Tanzillo" wrote in message
> news:C53593B2F9B3BB143F09D36869481C39@in.WebX.maYIadrTaRb...
> > "Scott" wrote in message
> > news:EC7A923A596FE7F8A37B0B7792263179@in.WebX.maYIadrTaRb...
> > > I'm writing a routine that, by default, prompts the user to enter a real
> > > value. I would also like to give the user the ability to type "G", or
> > > something, and be able to graphically select a point on the screen. I'm
> > > currently using "thisdrawing.utility.getreal("Enter station: ") but how
> do
> > I
> > > modify it to accept an response like "G" and then issue another prompt
> for
> > > the graphical selection? Thanks, Scott
> >
> > You can just skip the "G" option, and just use GetDistance()
> > instead of GetReal(). GetDistance() lets you to specify the
> > distance by entering a real number, or by picking two points.
> >
> >
> >
0 Likes