Remember this line at the top of your application:

include "mapbasic.def"

Kind regards

Uffe Kousgaard
www.routeware.dk


----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 19, 2005 4:23 AM
Subject: MI-L MapBasic help


> Hello listers,
>
> I'm trying to write a MapBasic script that searches two seperate fields in
> a table to zoom to an area in a Map Window.  I've come up with the
> following, but it always falls over at the CommandInfo(CMD_INFO_DLG_OK)
> section - where it says variable not defined.
>
> Can anyone offer me any help. Also, any help with the rest of it would be
> much appreciated, I'm a real beginner at this MapBasic thing.
>
> Thanks, Matt Davis.
>
>
> Dim search_pid as Integer
>
> Dialog
>   Title "Search"
>   Control StaticText
>     Title "Enter PID to find"
>   Control EditText
>         Value search_pid
>         Into search_pid
>   Control OKButton
>   Control CancelButton
>
> If CommandInfo(CMD_INFO_DLG_OK)
>         Then Select * from parcels_shape_gda94 where Pid =
> Int("search_pid") into pid_sel
>                 End If
>
> If TableInfo (pid_sel, TAB_INFO_NROWS) >= 1
>         Then Set Map Clipping Object pid_sel.obj Using Display All
>                 End Program
> Else Select * from parcels_shape_gda94 where Pid = Int("search_pid") into
> pot_pid_sel
>                 End If
>
> If TableInfo (pot_pid_sel, TAB_INFO_NROWS) >= 1
>         Then Set Map Clipping Object pot_pid_sel.obj Using Display All
> Else
>         Dialog
>                 Title "That's not a valid PID"
>                 Control OKButton
> End If
>
> Matt Davis,


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16526

Reply via email to