Carolyn

This is just the same as if you chose any of the other tool buttons on
the MI "Main" toolbar.  It stays active till you select another
toolbutton.  So, yes, in a way;  it's not so much a "pause" as waiting
for you to do something with the toolbutton, i.e. click on the map.

Now, if you have other buttons to click, or, Say, a dialog (where you
have to click OK to dismiss it) then it's likely another button will
have been selected.  In this case you'll have to reselect your original
to start the process over.

If you had, say, a logical flag in your prog then you could perhaps use
the same tool to select your centreline point.  The flag could be
set-reset wiyth each use, denoiting whether it's getting the start or
centre point.  I mean, the proc outlined is essentially just a
"point-getting" routine and could equally be called GET_POINT :-)

Sub GET_POINT
' ___________
  Dim   lnX, lnY as Float,
  ...
  Set CoordSys Window FrontWindow() 
  lnX            = COMMANDINFO( CMD_INFO_X)
  lnY            = COMMANDINFO( CMD_INFO_Y) ' where've we clicked?
  llStartPoint = not llStartPoint             ' Toggling usage of the
tool
  If llStartPoint then
      ... Code to process start point co-ords
  Else
      ... Code to process start centreline point co-ords
  End If
  ...
  

And you're welcome.

Terry

-----Original Message-----
From: Carolyn Bergin [mailto:[EMAIL PROTECTED] 
Sent: 30 January 2006 05:57
To: Terry McDonnell
Subject: RE: [MI-L] MI - L - MapBasic Help with User Selections

Great thanks Terry

Do you know... Will this allow the program to Pause I guess to allow the
user to click on the map. So I can have essitially one pushbutton and
then a series of promts though out the process for the user to select
columns and eventually the centreline point. Or does one process need to
stop and the user then click on a new button to continue?

I was hoping to have just one button but I can create a complete button
pad if I need to for each step in the process.

Thanks again for your help

Carolyn 

-----Original Message-----
From: Terry McDonnell [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 January 2006 6:19 PM
To: Carolyn Bergin; [EMAIL PROTECTED]
Subject: RE: [MI-L] MI - L - MapBasic Help with User Selections

Carolyn

Below are a few snippets to help. I've assumed a buttonpad to select a
tool that you click to get the co-ords.  Selecting the tool "primes" the
procedure GET_START_POINT, such that when you click the map it "fires",
thus getting the start x/y into float vars.  Then do your pipelining
stuff.

HTH

Terry
_________________________________________
   Create ButtonPad "Facilities" As 
    ...
    ToolButton  
       HelpMsg "Click this to select Start Point" 
        Calling GET_START_POINT
                ID ...
            ...
                Cursor   MI_CURSOR_CROSSHAIR 
                DrawMode DM_CUSTOM_POINT
...
Sub GET_START_POINT
' _________________
  Dim   lnX, lnY as Float,
  ...
  Set CoordSys Window FrontWindow() 
  lnX   = COMMANDINFO( CMD_INFO_X)
  lnY   = COMMANDINFO( CMD_INFO_Y)
' where've we clicked?
  ...

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Carolyn
Bergin
Sent: 27 January 2006 06:30
To: Terry McDonnell
Subject: [MI-L] MI - L - MapBasic Help with User Selections

Hi list

I have searched the archives because im sure ive read about this in the
past but I cant seem to find what I need. 

Basically im writing a tool that will build a pipeline between a serious
of centreline points.  I need for the user of the tool to be able to
select the beginning centreline point for the creation of my pipline.
The first part of the program creates the points, im then looking to
allow the user, while the program is running to selelct the start point
and the program will continue running from there to create my lines.

I really just need to take the x and y coordinates from the users
selection and place that information into variables to begin the second
part of the process.

Can anyone help me?

I hope this makes sense.

Regards

Carolyn Bergin

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l







_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to