Re: MI Mapbasic Create table statement

2000-09-21 Thread steph Morel

Hi Dan
you can also use "run command mycommand" where mycommand is a string
like that :

Dim mycommand as String
mycommand = "Create Table"+chr$(34)+ "mynewtablename"+chr$(34)+"(field1
Char(10)) file"+chr$(34)+ "c:\temp\mynewtablename.TAB"+chr$(34)+" TYPE
NATIVE Charset+chr$(34)+ "WindowsLatin1"+chr$(34)
run command mycommand

The string "mycommand" rebuilt the create table statement but with this
kind of syntax you can specify the parameter you want even to create non
native table like dbf or ascii

I hope this could help you

stephane


 "Clark, Daniel (CRTLDN)" a écrit :
 
 Hi List,
 
 Is it possible to use a string variable as the table name in the
 MapBasic 'Create Table' statement? (ie the variable contains a user
 specified table name from a dialog)
 
 I have tried the following:
 
 Create Table UserTable (Ring Smallint, Radius Smallint,
 Units Char(10), Statistics Smallint)
 File TableName
 Create Map For Buffer
 
 Where UserTable is the variable containing the name of the table as
 specified by the user. When this is run I get the message "Expression
 does not evaluate to a column or table name"
 
 Any help will be apprieciated.
 
 Dan Clark
 
 (  Tel  +44 20 7842 5066
 Ê Fax  +44 20 7842 5276
 *  [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic Create table statement

2000-09-20 Thread Clark, Daniel (CRTLDN)
Title: Mapbasic Create table statement





Hi List,


Is it possible to use a string variable as the table name in the MapBasic 'Create Table' statement? (ie the variable contains a user specified table name from a dialog)

I have tried the following:


Create Table UserTable (Ring Smallint, Radius Smallint,
  Units Char(10), Statistics Smallint)
File TableName 
Create Map For Buffer


Where UserTable is the variable containing the name of the table as specified by the user. When this is run I get the message "Expression does not evaluate to a column or table name"

Any help will be apprieciated.


Dan Clark


( Tel +44 20 7842 5066
 Fax +44 20 7842 5276
* [EMAIL PROTECTED]





RE: MI Mapbasic Create table statement

2000-09-20 Thread Tim.Nuteson (Exchange)
Title: Mapbasic Create table statement





Hi 
Dan. Here's an example that works for me. The FileSaveAsDlg() 
function prompts user to specify a table name, and returns the full path info 
for the specified location. You then need to use PathToTableName$() to 
extract the tab name from the full path.

Tim 
Nuteson
Target Corp.



Dim 
NewFile, NewTab as String

NewFile = FileSaveAsDlg(, 
, TAB, Create New Table)

If NewFile =  Then 
'cancelled
 Exit Sub
Else
 NewTab = 
PathToTableName$(NewFile)
End 
If

' create the table
Create Table NewTab
 (Name 
Char(30))
 File 
NewFile

-Original Message-From: Clark, Daniel (CRTLDN) 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 20, 
2000 9:08 AMTo: '[EMAIL PROTECTED]'Subject: MI 
Mapbasic Create table statement
Hi List, 
Is it possible to use a string variable as the 
table name in the MapBasic 'Create Table' statement? (ie the variable 
contains a user specified table name from a dialog)
I have tried the following: 
Create Table UserTable (Ring Smallint, Radius Smallint,   Units Char(10), Statistics Smallint) 
File TableName 
Create Map For Buffer 
Where UserTable is the variable containing the 
name of the table as specified by the user. When this is run I get the 
message Expression does not evaluate to a column or table 
name
Any help will be apprieciated. 
Dan Clark 
( Tel +44 20 7842 
5066  Fax +44 20 
7842 5276 * [EMAIL PROTECTED] 


MI MapBasic: dec to hex

2000-09-19 Thread Holger Sternad

Hello all,

I know that MapBasic offers a function to convert hexadecimal values into decimal 
numbers. But what
I am looking for is a way to do the contrary: convert decimal into hexadecimal numbers.
Browsing through the list's archive I found that this question has been posted to the 
list before.
Unfortunately I didn't find the corresponding answer and my e-mail to the sender of 
the question has
not reached the recipient.

Any help will be appreciated.

Holger
[EMAIL PROTECTED]


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic: dec to hex

2000-09-19 Thread Anssi Joutsiniemi

Holger,

Here is the function I use for conversion.

Anssi


'*
Function Hex(ByVal iInput As Integer, ByVal iFormat As Integer) As String
 Dim x As Integer
 Dim i, iDummy As SmallInt
 Dim sGlyph, sOut As String

 x = iInput
 Do While 1
  i=i+1
  iDummy = (x/16^(i-1)) Mod 16
  Do Case iDummy
   Case 10
sGlyph = "A"
   Case 11
sGlyph = "B"
   Case 12
sGlyph = "C"
   Case 13
sGlyph = "D"
   Case 14
sGlyph = "E"
   Case 15
sGlyph = "F"
   Case Else
sGlyph = Str$(iDummy)

  End Case

  sOut = sGlyph + sOut
  If x  16^i Then
   Exit Do
  End If
 Loop

 If iFormat Then
  iDummy = iFormat-Len(sOut)
  If iDummy  0 Then
   sOut = String$(iDummy,"0")  sOut
  Else
   sOut = Right$(sOut,iFormat)
  End If
 End If

 Hex = sOut

End Function

'***


- Original Message - 
From: Holger Sternad [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 19, 2000 10:21 AM
Subject: MI MapBasic: dec to hex


 Hello all,
 
 I know that MapBasic offers a function to convert hexadecimal values into decimal 
numbers. But what
 I am looking for is a way to do the contrary: convert decimal into hexadecimal 
numbers.
 Browsing through the list's archive I found that this question has been posted to 
the list before.
 Unfortunately I didn't find the corresponding answer and my e-mail to the sender of 
the question has
 not reached the recipient.
 
 Any help will be appreciated.
 
 Holger
 [EMAIL PROTECTED]
 
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic Flowcharter tool???

2000-09-14 Thread Doyle, Peter W

Greetings ,

Does anybody know if such a tools exists, that will read in Mapbasic code,
and output a flowchart or logical representation of it??

Regards

Peter Doyle
TELSTRA
NTG
Global Connect 
OnAir Networks Queensland
Geographical Information Systems  Mapping
'  +61 7  34064304
Email: [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI Mapbasic - object rotation

2000-09-07 Thread pel



hi Chris, all


This function rotate a region with the angel v, around the centroide of the
object. Note that the function only rotates a simpel region with one
polygon

NB - there was an error in my first mail

Function RotateObj(byval o as object, byval v as float )as object
dim i, N as Integer,
NewObj as object,
NewX, NewY, X, Y, cx, cy, AngelRad as float

RotateObj = o
AngelRad  = v * DEG_2_RAD
if objectInfo(o, obj_info_type) = obj_type_region then
   N = ObjectInfo(o, OBJ_INFO_NPNTS)
   Create Region into Variable NewObj 0
   cx = centroidx(o)
   cy = centroidy(o)
   For i = 1 to N
   X = ObjectNodeX(o, 1, i) - cx
   Y = ObjectNodeY(o, 1, i) - cy
   NewX = cx + ((X * cos(AngelRad)) - (y * sin(AngelRad)))
   NewY = cy + ((X * Sin(AngelRad)) + (y * Cos(AngelRad)))
   Alter Object NewObj  Node Add ( Newx, Newy )
   Next
   Alter Object NewObj Geography OBJ_GEO_CENTROID, CreatePoint(cX, cY)
   RotateObj = NewObj
else
   print "object is not a region"
end if
end function


Med venlig hilsen
Peter Laulund

*
Kort  Matrikelstyrelsen  ·  www.kms.dk
National Survey and Cadastre - Denmark
Rentemestervej 8  ·  DK 2400 København NV
E-mail:  [EMAIL PROTECTED]  ·  Home: [EMAIL PROTECTED]
Phone: +45 3587 5050  ·  Direct: +45 3587 5173

*







"galmala" [EMAIL PROTECTED] - 2000 09 06 01:13:04

Til:[EMAIL PROTECTED]
cc:  (bcc: Peter Laulund/MI/KMS)
Vedrørende:MI Mapbasic - object rotation





Hey there guys,


I have written a simple mapbasic script/routine that plots various
rectangles from data on a table. What I would like to do next is be able to
rotate these objects  I know that you can rotate symbols, but is there
any statement / function to rotate ojects (rectangles created from Create
Rect)???

Thanks in advance,

Chris





Hey there guys,


I have written a simple mapbasic script/routine 
that plots various rectangles from data on a table. What I would like to do next 
is be able to rotate these objects  I know that you can rotate symbols, but 
is there any statement / function to rotate ojects (rectangles created from 
Create Rect)???

Thanks in advance,

Chris



MI mapbasic: clear cosmetic layer

2000-09-01 Thread Daniel Budmiger

dear all,

how can i clear a rectangle or another object from the cosmetic layer in
mapbasic?

thx

Daniel Budmiger


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI mapbasic: clear cosmetic layer

2000-09-01 Thread Jacques Paris

delete from layerinfo(frontwindow(),0,1)

That works from the MapBasic window. Could replace frontwindow() by any
mapper name

Jacques PARIS

e-mail[EMAIL PROTECTED]
For MapInfo support, see the Paris PC Consult enr. site  at
http://www.total.net/~rparis/gisproducts.htm

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Daniel Budmiger
Sent: September 1, 2000 2:40 AM
To: Mapinfo User Group
Subject: MI mapbasic: clear cosmetic layer

dear all,

how can i clear a rectangle or another object from the cosmetic layer in
mapbasic?

thx

Daniel Budmiger


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic 4.0 and 5.0

2000-08-30 Thread GPurnomo

Hello Lists,

Our tech. support department is planning to upgrade our MapBasic from ver.
4.0 to 5.0 or higher.
Could you kindly share any info on these two version - what was the
difference(s)? Any significant enhancements?
We are still using MapInfo 5.0 - Can we use mbx program created in the
latest version with the earlier MapInfo, for example: mbx made in 5.5 to be
used in MI 5.0?

Thanking you all in advance.

Gatot Purnomo
PT. GEONUSA INFOTAMA (GEOINFO)
Tel. 62-21-82413187, 8200167
Fax. 62-21-8200167
E-Mail: [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic 4.0 and 5.0

2000-08-30 Thread Mats Elfström

GPurnomo wrote:
 Could you kindly share any info on these two version - what was the
 difference(s)? Any significant enhancements?
 We are still using MapInfo 5.0 - Can we use mbx program created in the
 latest version with the earlier MapInfo, for example: mbx made in 5.5 to be
 used in MI 5.0?

Hi Gatot!
The policy of MI Corporation is to release MI Pro and MB versions
hand-in-hand. This is to enable programmers to use the new functions of
each release in programming.
If you do not want to do this, it is perfectly all right to continue
programming in v 4 and run the code in MI v5, 5.5 and so on.
But because code that have been compiled in MB v5 may contain functions
not available in MI v4, MapInfo checks the version stamp of the MBX and
refuses to run an MBX with a higher version than itself.
So to conclude: If you need the new v5 or 6 functions you must upgrade
your MapBasic but at the same time, you must be aware that older MI
versions will not be able to run your programs.

Search the archives of this list for a number of tips to circumcise this
problem, it is possible to alter the MBX header but you must be sure to
NOT use the newest functions for this to work.
Another solution is to keep copies of the old compiler - the manuals
describe how to use the compiler from the command line. 

It must also be said that apart from the version upgrades, absolutely
nothing has been changed in the programming environment - it is still
very simple to say the least.
What we would need are for example template constructs, codeword
coloring, realtime syntax check, visual dialog creation etc all of which
are common in programming tools of today. But I doubt it will ever
happen.

Regards, Mats.E
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic/Oracle733

2000-08-28 Thread Haavard Bogh-Olsen

hello

I have a problem getting my table mapped. I am now using MapInfo 4.5
and oracle733. I am writing the following code:
**
Include "mapbasic.def"
'Include "C:\MapBasic\menu.def"

Declare Sub Main

Sub Main

Dim ConNum As Integer
ConNum = Server_Connect("qelib","DSN=WareHouse;PWD=map;SRVR=House")

Server ConNum Link Table
"Select * from Customer_Data"
 Into temp

Server ConNum Create Map For "Customer_Data"
Type XYINDEX("Longitude", "Latitude")
'Longitude and latitude is the names of the two columns that
'contains x,y coord.-info.

CoordSys Earth Projection 1, 0
ObjectType Point
Symbol (35,0,12)

Server ConNum Disconnect


End Sub 'Main

***
Something is very wrong in this codebut what??

thank you very much
haavard

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI: Mapbasic calling DLL's in Win98

2000-08-21 Thread BMaes

I don't think this is a MI related problem, but you never know...

My Mapbasic application returns with an error message when it tries to make
a DLL call on a Windows 98 platform. On Windows NT things work just fine.
Anyone ran into a similar problem?

By the way, the DLL was home-made (written in Visual C++), so maybe the
problem is over there. Anyone familiar with writing DLL's which work on
multiple Windows platforms? Or is this a Windows 98 issue?

Any help will be greatly appreciated!

Bart Maes

 
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic getting variables into brush styles.

2000-08-18 Thread Simon W Fox

Dear all

I know this is simple but I can't get it to work. Basically I want to put a
chosen colour from a dialog popupmenu into a variable and then into a fill
colour for a polygon.

The following line is where I am trying to set the colour of my polygon
table, Can_col is the variable which has the colour code number.


Set Map Layer 2 Display Global Global Brush (2, Can_col ,16777215) 


Should I have the variable in " "'s or between + +'s, I've tried allsorts
but can't get the program to compile.

Please tell me where I'm going wrong, how do you get a variable into
something like this?


Thanks in advance

Simon


 -
 Rivers and Coastal Section
 WS Atkins
 Warrington
 Tel: 01925 622029
 Fax: 01925 622054
 -
 
 This email and any attached files are confidential and copyright
 protected.
 If you are not the addressee, any dissemination of this communication is
 strictly prohibited.  Unless otherwise expressly agreed in writing,
 nothing stated in this communication shall be legally binding.
 
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI Mapbasic getting variables into brush styles.

2000-08-18 Thread Andrew_Dressel

I want to put a chosen colour from a dialog popupmenu into a
variable and then into a fill colour for a polygon.

The following line is where I am trying to set the colour of my
polygon table, Can_col is the variable which has the colour code
number.

Set Map Layer 2 Display Global Global Brush (2, Can_col ,16777215)


It works this way:

Dim s As String

s = Set Map Layer 2 Display Global Global Brush (2, " +
Can_col + ",16777215)"

Run Command s



--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI Mapbasic getting variables into brush styles. (Correction)

2000-08-18 Thread Andrew_Dressel

I forgot a quotation mark at the beginning of the string:

Dim s As String

s = "Set Map Layer 2 Display Global Global Brush (2, " +
Can_col +
", 16777215)"

Run Command s


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic-tool for making houses rectangular

2000-08-14 Thread Christian Malmquist

I think I have seen a tool at http://www.directionsmag.com/tools/ that can
help me make my freshly digitalized houses rectangular. But I can't find it
now. Have anyone seen or used such an application?

Best Regards
-Christian Malmquist-

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Onerror error?

2000-08-11 Thread Barry Weston



Hi,
I have a MapBasic application that contains various Onerror statements.
One error-handling routine contains an Open Table command (to allow me to edit a
particular table before closing the program), the application runs the onerror
statement upto the Open Table command and then displays the standard MapInfo
error statement (application name, line number, error) and then stops without
opening the table or continuing through the rest of the onerror routine.

Has anyone else experienced this? Has anyone any suggestions?


   thanks,
 Barry




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED] 

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Question

2000-08-07 Thread Roy N. Chiappini

Thanks in advance!

I have a bunch of files that require a change from vertical to
horizonal.  Such as:
From
123
456
789
101112
131415

to:
123,456,789,101112,131415

These files are super long.  Result will have to at least 256 values
wide.

I seem to remember back in my FORTRAN days that a write to file followed
by a , or ; would suppress the line feed/CR.

Can't for the life of me figure it out in MapBasic (without use of a
super long Format statement).

Hope there is a simple solution.

Thanks

Roy
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Visual Dialog Builder -- Just Released

2000-07-16 Thread Trey Pattillo



Hello all,

I just finished the beta for DiaBuilder 
forvisually building MB Dialogs.

Thebeta/demo isfully 
functional,with the exception of only accepting one of each 
control,
something of a individual use
The full registered version will handleall 
you need, more of a developers use.

Written in Delphi, so no install, registry or other 
baggage.

Will be posting on the web in the next 
day

Send me a mail if you want a 
copy..


Trey Pattillo[EMAIL PROTECTED]http://www.wap3.com


MI - MapBasic lists

2000-07-13 Thread Tom Manson

Mappers,

I'm having a problem with MapBasic. Is it possible to create a drop-down
list within a dialog box of files currently open. From what I gather,
drop-down boxes (popupmenu) seem to be pretty static, and I can't seem to
find a way of making it list files 'on the fly'. If anyone could help me
with the code on this I'd be very appreciative. On a similar line, how can I
list what columns a file has?

Many thanks in advance,


Tom
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI - MapBasic lists

2000-07-13 Thread Crompton, Mark

Hi Tom,

One of the ways I do it, is through Global variables (I know programmers
should not use Globals).  With a global array you can resize it inside on of
the handler routines.  This may not work as written, as I re-hashed some of
my current code to make it easier to read, but the basic concept is the
same.

This is what I do for a ListBox:

1)  Make a selection, put it into a temporary table, pull out the required
column into a Global Array (gaszPickSiteName)

Select SiteName from DCCMatches where SiteName  "" Group by
SiteName Order by SiteName into TT
ReDim gaszPickSiteName(TableInfo(TT, TAB_INFO_NROWS))
For snLoop = 1 to TableInfo(TT, TAB_INFO_NROWS)
Fetch Rec snLoop From TT
gaszPickSiteName(snLoop) = Str$(TT.SiteName)
Next

2)  ListBox Control
Control ListBox
Width 50  Height 70
Position 5, 35
ID PICKSECTORLISTBOX
Calling UpdateSectorListBox

3)  Handler Routine

Sub UpdateListBox()
Dim snReadSelValue, snLoop, snCounter As SmallInt
Dim szSiteName As String

'   *** Only 1 item at once, sorry
'   *** (returns 0 if no items selected).
'   *** Value returned is the same as ROWn from TT
snReadSelValue = ReadControlValue(PICKSECTORLISTBOX)

snCounter = 0
If (snReadSelValue  0) Then
Fetch Rec snReadSelValue from TT
szSiteName = TT.SiteName

For snLoop = 1 to TableInfo(TT, TAB_INFO_NROWS)
Fetch Rec snLoop From TT
If Str$(TT.SiteName)  szSiteName Then
snCounter = snCounter + 1
gaszPickSiteName(snLoop) = Str$(TT.SiteName)
End If
Next

ReDim gaszPickSiteName(snCounter)
Alter Control PICKSECTORLISTBOX Title From Variable
gaszPickSiteName
Close Table TMP
End If
End Sub

Hope that this helps,
Mark

-Original Message-
From: Tom Manson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 13, 2000 9:00 AM
To: 'MapInfo-L'
Subject: MI - MapBasic lists


Mappers,

I'm having a problem with MapBasic. Is it possible to create a drop-down
list within a dialog box of files currently open. From what I gather,
drop-down boxes (popupmenu) seem to be pretty static, and I can't seem to
find a way of making it list files 'on the fly'. If anyone could help me
with the code on this I'd be very appreciative. On a similar line, how can I
list what columns a file has?

Many thanks in advance,


Tom
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI - MapBasic lists

2000-07-13 Thread Bill Thoen

"Crompton, Mark" wrote:
 
 One of the ways I do it, is through Global variables (I know programmers
 should not use Globals).  With a global array you can resize it inside on of

Not exactly; programmers should not use *uncontrolled* globals.
Even everyone's favorite whipping boy, the lowly-regarded Goto,
has it's place (but 99% of the time that place is the
wastebasket.) Module scope globals are almost required for any
MapBasic dialog beyond the trivial. For those, I just create a
separate module for the dialog, and then use 'dim' to define
globals I need. That way there's little chance that a global
there can foul some other part of the application. 

Defining variables as 'global' instead of 'dim' at the module
level is what I'd call uncontrolled, and should only be done if
you want to live in interesting times. Besides, anyone who
programs in MapBasic already has to compromise his or her sense
of purity to a certain extent. In a language where there are no
function-level static variables and NO private functions
anywhere, you can only be so holy about it. Especially when it
comes to dealing with MapBasic dialog structures. 

Your global array is easily a module-scoped variable, and the use
you make of it is clever, obvious and totally appropriate. I
wouldn't put down the use of globals here.

- Bill Thoen

GISnet, 1401 Walnut St., Suite C, Boulder, CO  80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.ctmap.com/gisnet


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI Mapbasic 6.0 / strange window behaviour

2000-07-10 Thread mike . saunt

David

Seems to happen on my machine as well.  It doesn't occur when the toolbar is
docked though.  Alternatively you could add the following statement although
it causes a 'flash' of the window (i.e. notepad in your example)

Note statement
Set Window MAPINFO Front

Regards
Michael

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, July 10, 2000 11:52 AM
To: [EMAIL PROTECTED]
Subject: MI Mapbasic 6.0 / strange window behaviour

Hello mappers

I have recently recompiled an existing mapbasic application to run under
version
6.0 and have noticed that when using the "NOTE" command called from a
pushbutton
the mapinfo window disappears after the user clicks the OK button and
whatever
other application a user may have running appears instead.

To reproduce the error proceed exactly as follows:-

1)   Load an application such as Notepad
2)   Perform an action in this window (type some text or maximize the window
for
example)
3)   Load Mapinfo
4)   Run the attached code
5)   Click on the OK button and hey presto the notepad window
appears or is it just my set up?

I was wondering if other developers have experienced this or can anyone
reproduce the same behaviour?

Many Thanks

Owen

PS:- I'm running on NT 4 / service pack 5.

***
DECLARE SUB MAIN
DECLARE SUB NOTE

INCLUDE "ICONS.DEF"
INCLUDE "MAPBASIC.DEF"

SUB MAIN

 CREATE BUTTONPAD "TEST" AS
  PUSHBUTTON
   CALLING NOTE
   ICON MI_ICON_OPEN_FILE
   HELPMSG "NOTE TEST"

  POSITION (1,1) UNITS "IN"
  WIDTH 1

END SUB


SUB NOTE

 NOTE "See what happens when you click OK"

END SUB
***


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic - Reading if text object has carriage returns

2000-06-29 Thread Dany Bouchard



This has to besimple !
I am just trying to figure out if a text object 
textstring (returned by ObjectInfo(obj, 
OBJ_INFO_TEXTSTRING) has carriage returns.
Is there an easy way aside from looping through all 
characters and checking for carriage returns by converting each character using 
ASC() ?

Thanks in advance !

Salutations.

Dany BouchardDBx Geomatics38 de 
l'OrbiteHull, QuébecCanadaJ9A 3C7Téléphone/Telephone: 
819.743.3870Télécopieur/Fax: 819.775.3264Courrier électronique/Email: [EMAIL PROTECTED]Page Web/Web site: 
http://www.dbxgeomatics.com/home.aspVitrine 
technologique SVG / SVG Technology Preview: http://www.dbxgeomatics.com/svg.asp


MI mapbasic 3 and/or 4.5 wanted

2000-06-28 Thread r.lawley



Hi, not sure if the list is really the place for 
this, so apologies in advance
I am looking for a valid (ie legal) copy of 
mapbasic 3 or mapbasic 4/4.5. I'm not too bothered about manuals, but the 
software must be uk english (not sure if thats an issue really..but I know 
I cant read dutch!) and have a valid licence (remember..you may need your 
licence if youve been 'upgrading')...oh..and cheap would be nice..but two out of 
three will do! 

Regards
r


MI MapBasic : use of custom functions as expression in a Select

2000-06-16 Thread Gilles Labeeuw

I have some problems with the use of custom functions in the selected
expressions of a select.
For instance :

Table XYZ contains the Fields SPAN as Float and OTHER as Float

Declare Function my_func (ByVal X as Float) as Float

Function my_func (ByVal X as Float) as Float
If X  15 Then my_func = X + 15 Else my_func = 0. End If 
End Function

Select * From XYZ Where my_func(SPAN)  40  === works

Update XYZ Set OTHER = my_func(SPAN)=== works

Select SPAN, my_func(SPAN)  === works not, gives 
empty field in col2

This last seems in contradiction with MapBasic 5.0 on-line help for
"Function ...End Function"
under sub-chapter "Availability of Custom Functions" 1st paragraph

Who can help me ?
Thank you,

eng. Gilles Labeeuw  

Ministère Fédéral des   Federaal Ministerie
Communications et Infrastructure  van Verkeer en Infrastructuur
Direction Routes:   Directie Wegen:
normes et banques de données   normen en databanken
Residence Palace Rue de la Loi 155  Residence Palace Wetstraat 155
B 1040 BruxellesB 1040 Brussel

   Tel. +31 (2) 287.31.63
   Fax. +31 (2) 287.31.80
   e-mail [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic - Version 4.0.2

2000-06-01 Thread Anitra Robertson

Hi All,

I am hoping someone can help me (desperately).

I am after a copy of MapBasic V4.0.2, as we have a number of Runtime
programmes still running off this, and I have changes to be made which I
am unable to compile in my current version of MapBasic(5.5), and our old
disks for V4.0.2 have disappeared, along with all traces of the
programme.

Can someone point me in a direction of where I could locate a copy, or
could someone donate an old copy to me?

Please help.

Thanks,

Anitra Robertson
GIS Analyst
Tattersall's
Melbourne, Vic, Australia

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic project estimation and planning (A long message)

2000-05-31 Thread Cautley, David/PDX

-Original Message-
From: Bill Thoen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 30, 2000 5:57 PM
To: [EMAIL PROTECTED]
Subject: MI MapBasic project estimation and planning


"I have found that most small mapbasic projects are fairly easy to plan and
estimate, but that the larger ones are sometimes a *lot* more difficult."
=

Oh boy.  I've spent the last 25 or so years of my career trying to figure
this out.  Basically, I'm a software developer that's been doing GIS part
time for the past five years...

First of all, the soap-box:  Software Engineering is a discipline unto
itself.  There is a large body of work and entire degree programs devoted to
it.  While it is usual for small projects to be done successfully by anyone,
the difficulty of projects explodes in a non-linear way with size, as Bill
observed.  I strongly suggest that anyone tackling a moderate to large size
project (more than 10-20 pages of code, 5 to 10 screens) engage the advice
of someone who is familiar with this kind of work.  You'll be happier, and
so will your users / client.  I know this sounds like an argument for job
crafts in some Union, but... "trust me".

Follow this link for a wonderful summary of "Software's Ten Essentials"

"Virtually every backpacker, rock climber, and recreational hiker in the
Pacific Northwest is familiar with the Seattle Mountaineers' list of "Ten
Essentials": extra clothing, extra food, sunglasses, knife, firestarter,
first aid kit, waterproof matches, flashlight, map, and compass. 
The Ten Essentials are the end-product of years of hard-won experience. They
are intended to help mountaineers avoid getting into trouble in the first
place, and, if that doesn't work, to minimize the damage. No experienced
mountaineer would go into the mountains without the Ten Essentials.
Experienced software developers have also accumulated years of hard-won
experience. Our software adventures often contain more uncharted paths and
dangerous territory than a simple hike in the woods does, and so I propose a
list of Ten Essentials for software projects. "

http://www.construx.com/stevemcc/bp08.htm




Having said that, here are a few of my favorite books on the topic:

"Exploring Requirements, quality before design" -- Donald C. Gause  Gerald
M. Weinberg  Dorset House, NY 1989

"Quality Software Management" (there are four volumes) -- Gerald M. Wienberg
Dorset House 1992 and following

"Software Project Survival Guide" -- Steve McConnell, Microsoft Press

"Rapid Development" -- Steve McConnell, Microsoft Press

The McConnell books cover much of the same territory, but Rapid Development
is 800 pages and the survival guide is 300.


For a great bibliography, see
Ed Yourdon's Web Page http://www.yourdon.com/
For some other great software engineering advice, you might consult Steve
McConnell's site: Software Project Survival Guide Web Site
http://www.construx.com/survivalguide
Or the home page, which leads to many great things including another book
list:
Steve McConnell's Home Page http://www.construx.com/stevemcc
Or, maybe Capers Jones site:
Software Productivity Research (Capers Jones) http://www.spr.com/index.htm
But wait, there's more!  (Yet another great bibliography)
http://www.holub.com/goodies/books.html   (Also look at the rest of the
site)


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic project estimation and planning

2000-05-30 Thread Bill Thoen

I have found that most small mapbasic projects are fairly easy to plan and
estimate, but that the larger ones are sometimes a *lot* more difficult. I'm
not sure how much of this is due to the lack of software management tools
available for mapbasic, and how much of this is just the usual problems
endemic in software planning, but I need to find some better techniques or
tools.

Sometimes I find that the first hurdle is finding out what the client really
wants. The problem is that they often don't know what's possible, or how to
describe what they only vaguely have in mind. When that happens, your
estimate and schedule is already in danger. Other times I under-estimate the
true complexity of the user interface, and a simple dialog box gets up off
the slab and turns into a lurching, moaning, multi-page monster. For
example, user-defined picklists can be a danger signal; they're not a
trivial edit control. Dialogs that link data from more than one table also
can get complicated, too. How do you estimate the depth of these pitfalls
(short of diving in headfirst and counting the seconds until impact)?

So does anyone have any tips, procedures, checklists, notation techniques,
reference sources, or whatever that they have found to make the software
planning, estimation and tracking tasks a little easier? If you have any
hints that you know work well, I'd love to hear from you. I'll summarize,
but if you want anonymity, I'll respect that too. I'm sort of fed up with
winging it (even though most people tell me that's basically what they do
too.)

TIA,
- Bill Thoen



--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic syntax

2000-05-25 Thread SenGupta,Georges

Dear All,

Is there a free available syntax list for MapBasic

Georges Sen-Gupta
Senior Statistics and Information Officer
Crime Reduction Unit
x62469

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



SV: MI MapBasic syntax

2000-05-25 Thread pke

Yes, it's called "Mapbasic Reference Guide" and comes with your purchased
MapBasic...

Peter Ketting
Miljø- og Energiministeriet
33 92 76 67
[EMAIL PROTECTED]


-Oprindelig meddelelse-
Fra: SenGupta,Georges [mailto:[EMAIL PROTECTED]]
Sendt: 25. maj 2000 11:33
Til: [EMAIL PROTECTED]
Emne: MI MapBasic syntax


Dear All,

Is there a free available syntax list for MapBasic

Georges Sen-Gupta
Senior Statistics and Information Officer
Crime Reduction Unit
x62469

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic syntax

2000-05-25 Thread Bill Thoen

MapBasic discussion happens right here. You also get MapInfo and
other product topics, info on data, rants and flames, pleas for
mercy, interesting irrelevant tidbits on geography, and once in a
while the odd virus. All that in one list. Amazing value, don't
you think?

But seriously, there are separate lists for MapX, MapXtreme, and
MapInfo TAB file anatomy, but I don't know if anyone has set up
one for MapBasic alone. Until someone gets one started over on
egroups.com or somewhere else, feel free to post on MapBasic
topics right here on MapInfo-L. Put "MB" in the subject so people
will know the message is about MapBasic, and I expect you'll get
a pretty good response if you don't ask too many questions in a
single message.

- Bill Thoen

"SenGupta,Georges" wrote:
 
 Dear All,
 
 Is there a free available syntax list for MapBasic
 
 Georges Sen-Gupta
 Senior Statistics and Information Officer
 Crime Reduction Unit
 x62469
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic version of Document.aml

2000-05-19 Thread Kanzler Julie

Hello Everyone, 

I know that government/military agencies (and their contractors) use
Document.aml (an ArcInfo AML script) to produce FGDC-compliant metadata and
to automate the metadata development process.  It would be nice if I could
find an existing MapBasic equivalent of this AML script, but I'm also
looking for any and all information relating to the kind of output it
produces, in case I end up developing a MapBasic version.  

Thanks very much,

Julie Kanzler
GIS Specialist
Wyle Laboratories
Arlington, VA
(703) 415-4550 ext.20
[EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MAPBASIC: Putting inside strings, eg string = Press Push

2000-05-11 Thread Crompton, Mark

Use the Run Command function in MapBasic.  You can write multiple " to
signify a ".  
 
E.g.
to place a SHADE WINDOW command in a MapBasic Program try
 
szCommand = "Shade window "+FrontWindow()+" 1 with "+ColumnInfo(MYTABLE,
"col1", COL_INFO_NAME)+" ignore """" values """+szMyValue+""" Brush
(2,16711680,16777215) Pen (1,2,0) default Brush (2,65280,16777215) Pen
(1,2,0)"
Run Command szCommand
 
Will produce the following line
Shade Window 12345678 1 with COLUMN1NAME ignore "" values "MYVAL" Brush
(2,16711680,16777215) Pen (1,2,0) default Brush (2,65280,16777215) Pen
(1,2,0)
 
Obviously some artistic license has been used with the names, but you get
the gist?
Hope this helps,
Mark Crompton

-Original Message-
From: Ian Allan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 2:12 AM
To: Frontier Mapping Pty Ltd
Cc: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Subject: Re: MI MAPBASIC: Putting " inside strings, eg string = Press "Push"


Hi Michelle 

You may need to try using Chr$(34) instead of  ". 


Good Luck 
Ian Allan 
  
  


Frontier Mapping Pty Ltd wrote: 


Hi, I have a program that only exports files to NonEarth (it's a bug in
their software)  I'm trying to write a MB app that will read in their MIF
file, replace with an appropriate projection and then import into Mapinfo.
However the string that defines the projection has "m" within it, ie the
inverted comma's need to be part of the string.  I've tried ""m"" but that
doesn't work. I KNOW theirs a way of doing this, but how? (the rest works
fine!) Help appreciated, Thanks,  Michelle, Melbourne, Australia
mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MAPBASIC: Putting inside strings, eg string = Press Push

2000-05-10 Thread Frontier Mapping Pty Ltd



Hi,

I have a program that only exports files to 
NonEarth (it's a bug in their software) I'm trying to write a MB app that 
will read in their MIF file, replace with an appropriate projection and then 
import into Mapinfo. However the string that defines the projection has 
"m" within it, ie the inverted comma's need to be part of the string. I've 
tried ""m"" but that doesn't work. I KNOW theirs a way of doing this, 
but how? (the rest works fine!)

Help appreciated,

Thanks, Michelle, Melbourne, 
Australia
[EMAIL PROTECTED]


Re: MI MAPBASIC: Putting inside strings, eg string = Press Push

2000-05-10 Thread Ian Allan



Hi Michelle
You may need to try using Chr$(34) instead of ".
Good Luck
Ian Allan


Frontier Mapping Pty Ltd wrote:

Hi,I
have a program that only exports files to NonEarth (it's a bug in their
software) I'm trying to write a MB app that will read in their MIF
file, replace with an appropriate projection and then import into Mapinfo.
However the string that defines the projection has "m" within it, ie the
inverted comma's need to be part of the string. I've tried ""m""
but that doesn't work. I KNOW theirs a way of doing this, but how? (the
rest works fine!)Help
appreciated,Thanks,
Michelle, Melbourne, Australia[EMAIL PROTECTED]




begin:vcard 
n:Allan;Ian
tel;fax:+61+3 9773-1232
tel;work:+61+3 9773-1232
x-mozilla-html:FALSE
org:Geocode mapping and analysis pl.
adr:;;PO Box 2072 ;Edithvale;Victoria;3196;Australia
version:2.1
email;internet:[EMAIL PROTECTED]
title:Director
end:vcard



MI MapBasic and SQL???

2000-04-26 Thread Tony Kelava

I'm trying this in mapbasic:

dim T as string
T = "links_table"
select * from T where T.data = 1


Which fails with an error message:
unrecognized command.

It seams to be choking on the fact that T.date is really "string"."column" and not 
really "table name"."column"

Fortunately for me in this case i can achieve what i want in other means, but it seams 
to me to be a horrible limitation.

I tried:

select * from T as _table1 where _table1.data = 1

but that doesnt work either.

Is mapinfo's sql braindead or what!?

Know of any other ways to put table names contained in strings into queries?


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic and SQL???

2000-04-26 Thread LVN




Hi Tony,

It's not an SQL issue, it's a syntax issue. And your syntax is wrong.

Use this construct instead:
 dim T1 as string, T2 as alias
 T1 = "links_table"
 T2 = T1 + ".data"
 select * from T1 where T2 = 1

To use indirect adressing always use an alias variable.

Regards
Lars Nielsen

**
Lars Nielsen[EMAIL PROTECTED]
Development Manager, MapXtreme iGIS Specialist
Kampsax / MapInfo GIS, Odensehttp://www.mapinfo.dk
Authorized MapInfo Partner  Distributor in Denmark
Address: Rugaardsvej 55, DK-5000 Odense C
Telephone: +45 6313-5000   Facsimile +45 6313-5090
--
GIS-hotel.dk   http://www.gis-hotel.dk
--
MapInfo Internet-GIS i Danmark   http://gis.mapinfo.dk
**




"Tony Kelava" [EMAIL PROTECTED] on 26-04-2000 09:06:54

To:   [EMAIL PROTECTED]
cc:
Subject:  MI MapBasic and SQL???




I'm trying this in mapbasic:

 dim T as string
 T = "links_table"
 select * from T where T.data = 1


Which fails with an error message:
 unrecognized command.

It seams to be choking on the fact that T.date is really "string"."column"
and not really "table name"."column"

Fortunately for me in this case i can achieve what i want in other means,
but it seams to me to be a horrible limitation.

I tried:

select * from T as _table1 where _table1.data = 1

but that doesnt work either.

Is mapinfo's sql braindead or what!?

Know of any other ways to put table names contained in strings into
queries?


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]




--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI; mapbasic problem

2000-04-25 Thread Ian Robertson

I am baffled by some MapBasic code that I want to use to do some spatial
smoothing. Briefly, I want to consecutively buffer each polygon in a table,
and use the buffers to select neighbouring polygons--some of these may be
used to smooth values associated with the central polygon that was used to
make the buffer (I have called this central polygon the "target"). To decide
which subset of the neighbouring polygons will be involved in the smoothing
work, I need to be able to compare their columns to those associated with
the central polygon.

In the following (very abbreviated) code I create the object "oTarget" and
the single-record table "rsTarget" for each record in the table. The
procedure "getNeighbours" buffers oTarget to select nearby records into a
multi-record table called "neighbourhood". The bizarre thing is that when I
cycle through rsTarget and assign the single value in each column to
targetSd (a float), I appear to acquire values that aren't even in
rsTarget--they seem to be coming from the first and last records in the
"neighbourhood" table--right column, wrong record(s). This makes no sense to
me, but I think I have verified this by printing out values of targetSd for
the first record (r=1) halting the program, and then displaying
neighbourhood and rsTarget in a browser. (note remmed out code in block
letters)

I hope I have made sense, and will be very grateful if someone can explain
to me what is going on, and how I might correct things. Thanks!

++

for r=1 to TableInfo(inputFile, Tab_Info_Nrows)

  Fetch Rec r From inputFile
  oTarget=inputFile.obj
  select * from inputFile where rowID=rowCount into rsTarget 'single
record...

  'getNeighbours creates table neighbours...
  Call getNeighbours (oTarget, rowCount, bufferNodes, bufferSize,
bufferUnits)
  neighbourhoodSize=TableInfo(neighbourhood, Tab_Info_Nrows)

  for c = 1 to numberColumns
'!!the next line assigns values to targetSd that are not in rsTarget!!
targetSd=rsTarget.col(c+numberColumns+1)
'PRINT TARGETSD
Call smoothCalc (various parameters, including targetSd)
  next 'c
'STOP
next 'r

++


Ian Robertson
Dept. of Anthropology
Arizona State University
Tempe, AZ, 85287-2402
[EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic PointInPolygon predicate function

2000-04-07 Thread PEM




Hi David,

Concerning the problem with checking whether a point is within a region:

You can use the geographical operators without SQL. That is you might
ask if one object is within/intersects/contains another:

***
**
Dim  oPoint, oRegion As Object

oPoint = CreatePoint(..)
Create Region Into Variable oRegion
 

'**Now check whether the region contains the point:
If oRegion contains oPoint Then
 '**point is within region
Else
 '**Point is NOT within region
End If
***
**
And in this way you are able of checking a lot of thing on your objects
without
having to save them to a table first and then use SQL.

And I do agree with you there seems to be a bug somewhere in MapBasic
concerning
the Error handling. I have also created a lot of object creating programs -
and of course
as a good programmer - added error handling to these function, because a
lot of things
might not go the way they were expected to do. Often my problem is that I
erase one object
with another. Somtimes the result is a not existing object and when I try
to nsert this object
into a table an error occures that is not handled proberly by the error
handling in my program.

Best regards,

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
Kampsax Geoplan Voice: +45 6313 5013
Rugårdsvej 55   Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic PointInPolygon predicate function

2000-04-06 Thread David M Haycraft

To MapBasic Developers

I recently undertook a small MapBasic project that turned out to be rather
more difficult than I anticipated and lead to the development of the subject
function.

The task seemed simple - create a 2D map of certain air traffic control
regions (or sectors) from an Excel spreadsheet containing info in this
format:

Region Longitude Latitude
Sector1 144. 12.
Sector1 155. 12.
Sector1 155. 7.3167
Sector1 154. 7.
Sector1 149. 7.
etc
Sector2 141. 5.
Sector2 141. 9.6167
Sector2 144.2500 9.5000
etc

Problem 1
--
My first effort simply used the MapBasic 5.5 statements
   dim objSector as object
   Create Region into variable objSector 0
   Alter Region objSector Node Add (fltX1, fltY1)
   Alter Region objSector Node Add (fltX2, fltY2)
   etc

This code created the regions ok but had a problem.  The centroid point of
each region was located at the first node of its boundary polygon, making
autolabelling ineffective, and -worse- making manual repositioning of the
centroids with the MapInfo Pro node editing tool difficult.

Problem 2

MapBasic 5.5 contains the statement
  Alter Object objSector Geography OBJ+AF8-GEO+AF8-CENTROID, objPoint
although it does not appear to be documented in the on-line Help.

My second attempt was to compute the MBR of each sector
(xmin,ymin,xmax,ymax) and then try to retrospectively set the centroid
property using the statements
   dim objPoint as object
   create point into variable objPoint((xmin+-xmax)/2,(ymin+-ymax)/2)
   OnError goto err1
   Alter Object objRegion Geography OBJ+AF8-GEO+AF8-CENTROID, objPoint
   err1:

The intent of this code was to set the centroid to mid-point of the region's
MBR if that point lies within, or on the border of the region, otherwise (if
the region has a concavity or hole in it) leave the centroid at its default
position on node 1.

Unfortunately the implementation of Alter Object Geography OBJ+AF8-GEO+AF8-CENTROID
seems to be faulty in that it bypasses MapBasic's error trapping mechanism,
so that, despite the OnError statement, the program simply aborted whenever
it encountered a problem region.

Problem 3
--
I could find no standard Mapbasic predicate function PointInPolygon that
could be used to detect the situation that causes Alter Object Geography
OBJ+AF8-GEO+AF8-CENTROID to crash and therefore avoid it.

Certainly one could use the SQL +ACI-within+ACI- operator to make this test, but the
code would be clumsy and inefficient, as you'd have to create and populate
two temporary MapInfo tables, with all the file I/O overhead involved, in
order to implement the test.

Solution
---
The ultimate solution was to implement a custom PointInPolygon function in
MapBasic.  I used the +ACI-ray tracing+ACI- algorithm in
   +ACI-Computational Geometry in C+ACI-
Joseph O'Rourke
Cambridge University Press 1993
   Page 233 ff

If anybody's interested in the source code for PointInPolygon (which works
for single polygon regions without bow-tie anomalies or donut holes) then
just ask.

Regards


David M Haycraft
Information Analysis Associates  Pty Ltd
ACN 085 516 105
1 Cumming Place, Wanniassa, 2903
Aust Capital Territory,  Australia
Phone/Fax:  61 +- 2 +- 6231 8104
Mobile: 0412 001 134
Email:  d.haycraft+AEA-acslink.aone.net.au
Web :  www.acslink.aone.net.au/actaa/iaa.htm
A MapInfo Technology Partner


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic PointInPolygon predicate function

2000-04-06 Thread Robert Crossley

the simplest answer to your problem is to convert the regions to polylines, and then 
back to regions - two lines of code and Mapinfo puts the centroid in the middle where 
it should be for you.

Thanks for the info on the new function, I didn't know it existed and it is somehting 
that I was requesting a couple of years ago  (and why I found the simplest way of 
avoiding the issue)

R

-Original Message-
From: owner-mapinfo-l+AEA-lists.csn.net
+AFs-mailto:owner-mapinfo-l+AEA-lists.csn.net+AF0-On Behalf Of David M Haycraft
Sent: Thursday, April 06, 2000 10:59 AM
To: mapinfo-l+AEA-csn.net
Cc: ozsupport+AEA-mapinfo.com
Subject: MI MapBasic PointInPolygon predicate function


To MapBasic Developers

I recently undertook a small MapBasic project that turned out to be rather
more difficult than I anticipated and lead to the development of the subject
function.

The task seemed simple - create a 2D map of certain air traffic control
regions (or sectors) from an Excel spreadsheet containing info in this
format:

Region Longitude Latitude
Sector1 144. 12.
Sector1 155. 12.
Sector1 155. 7.3167
Sector1 154. 7.
Sector1 149. 7.
etc
Sector2 141. 5.
Sector2 141. 9.6167
Sector2 144.2500 9.5000
etc

Problem 1
--
My first effort simply used the MapBasic 5.5 statements
   dim objSector as object
   Create Region into variable objSector 0
   Alter Region objSector Node Add (fltX1, fltY1)
   Alter Region objSector Node Add (fltX2, fltY2)
   etc

This code created the regions ok but had a problem.  The centroid point of
each region was located at the first node of its boundary polygon, making
autolabelling ineffective, and -worse- making manual repositioning of the
centroids with the MapInfo Pro node editing tool difficult.

Problem 2

MapBasic 5.5 contains the statement
  Alter Object objSector Geography OBJ+AF8-GEO+AF8-CENTROID, objPoint
although it does not appear to be documented in the on-line Help.

My second attempt was to compute the MBR of each sector
(xmin,ymin,xmax,ymax) and then try to retrospectively set the centroid
property using the statements
   dim objPoint as object
   create point into variable objPoint((xmin+-xmax)/2,(ymin+-ymax)/2)
   OnError goto err1
   Alter Object objRegion Geography OBJ+AF8-GEO+AF8-CENTROID, objPoint
   err1:

The intent of this code was to set the centroid to mid-point of the region's
MBR if that point lies within, or on the border of the region, otherwise (if
the region has a concavity or hole in it) leave the centroid at its default
position on node 1.

Unfortunately the implementation of Alter Object Geography OBJ+AF8-GEO+AF8-CENTROID
seems to be faulty in that it bypasses MapBasic's error trapping mechanism,
so that, despite the OnError statement, the program simply aborted whenever
it encountered a problem region.

Problem 3
--
I could find no standard Mapbasic predicate function PointInPolygon that
could be used to detect the situation that causes Alter Object Geography
OBJ+AF8-GEO+AF8-CENTROID to crash and therefore avoid it.

Certainly one could use the SQL +ACI-within+ACI- operator to make this test, but the
code would be clumsy and inefficient, as you'd have to create and populate
two temporary MapInfo tables, with all the file I/O overhead involved, in
order to implement the test.

Solution
---
The ultimate solution was to implement a custom PointInPolygon function in
MapBasic.  I used the +ACI-ray tracing+ACI- algorithm in
   +ACI-Computational Geometry in C+ACI-
Joseph O'Rourke
Cambridge University Press 1993
   Page 233 ff

If anybody's interested in the source code for PointInPolygon (which works
for single polygon regions without bow-tie anomalies or donut holes) then
just ask.

Regards


David M Haycraft
Information Analysis Associates  Pty Ltd
ACN 085 516 105
1 Cumming Place, Wanniassa, 2903
Aust Capital Territory,  Australia
Phone/Fax:  61 +- 2 +- 6231 8104
Mobile: 0412 001 134
Email:  d.haycraft+AEA-acslink.aone.net.au
Web :  www.acslink.aone.net.au/actaa/iaa.htm
A MapInfo Technology Partner


--
To unsubscribe from this list, send e-mail to majordomo+AEA-csn.net and put
+ACI-unsubscribe MAPINFO-L+ACI- in the message body, or contact bthoen+AEA-csn.net

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic and Legend Windows

2000-04-03 Thread Keith Campbell

Dear All,

I've noticed that if thematic layers are turned 
on / off with a Mapbasic app, the changes are not automatically passed 
to the legend / theme legend window. Presumably, the app needs to 
include a Set Legend statement or Set Cartographic Legend statement 
to update the legend?
Also, is it possible to create and manipulate a legend or theme 
legend window with MapBasic that will show the shading for thematic 
layers even if they are turned off?

Thanks in advance,

Keith

Keith Campbell
GIS Consultant
W S Atkins Consultants Ltd
UK
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI mapbasic dialogs and fonts

2000-03-09 Thread Larry Nolan



Hi 
 Is it possible to change the font in a 
mapbasic created dialog? I have some buttons in a dialog which I would like to 
put a symbol on rather than using text. What I want to do would lookvery 
similar to the symbol picker control available in mapbasic. I have tried trying 
the font using set style font ... and ten tested with currentfont() and my font 
gets set ok but it always defaults 
back to a basic arial font. 

any help would be appreciated.
thanks

Larry Nolan



Re: MI MapBasic API Calls - Getting current IP address

2000-03-08 Thread Dave Langley, Dataview Solutions Ltd.

Paul,

G'Day,
Does anybody know how to find out the IP address of a PC from within
MapBasic?  I assume that I will have to use API calls, however I can't
find
any documentation on this.

see http://www.mvps.org/vbnet/code/network/ipaddress.htm

This is a VB example that can easily be translated into MapBasic.

Regards,

Dave

Dave Langley

Mapping Applications Consultant
Dataview Solutions Ltd
London
UK

Telephone:  +44 (0)1635 581355
Mobile:+44 (0)973 797769

Business email: [EMAIL PROTECTED]
Personal email: [EMAIL PROTECTED]

Dataview Home Page: www.dataview-solutions.co.uk

_
WARNING - THIS E-MAIL TRANSMISSION IS CONFIDENTIAL.
This e-mail transmission (including any accompanying attachments)
contains confidential information which is intended for the named
addressee only. If you are not the intended recipient, you are hereby
notified that any use, dissemination, distribution or reproduction of
this e-mail is prohibited. If you have received this e-mail in error please
contact us immediately at [EMAIL PROTECTED] Thank you.
_


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic question

2000-02-28 Thread anssi joutsiniemi

Roy,

Dmitry posted some time ago an awesome example of using WinAPI 
CreateProcess() and WaitForSingleObject() functions to do just that.

I'm sure you can find it from list archive. I made this lil application to 
run GhostScript within MapInfo using that code and it seem to work very 
nice. I'll post it to Bill Thoen with the source in case you need more 
backup. Feel free to contact me directly, if you are in hurry.

Regards,
Anssi



-Alkuperainen viesti-
Lahettaja:  Roy Chiappini [SMTP:[EMAIL PROTECTED]]
Lahetetty:  27. helmikuuta 2000 15:25
Vastaanottaja:  Mapinfo List
Aihe:   MI MapBasic question

List:

Is there a way, from WITHIN MapBasic, to run a windows program AND not
return program control to the MapBasic program until the windows program
has completed operation?

Thanks

--
Roy N. Chiappini
Randa Enterprises
[EMAIL PROTECTED]
http://www.srv.net/~ziccardi/randa


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Vedr: MI MapBasic question

2000-02-28 Thread pel


Hi Roy

This code is from the FME-L, and it will stop mapinfo/mapbasic until your
external process has completed.

Peter Laulund
National Survey and Cadastre, Denmark



Type STARTUPINFO
  cb As Integer
  lpReserved As String
  lpDesktop As String
  lpTitle As String
  dwX As Integer
  dwY As Integer
  dwXSize As Integer
  dwYSize As Integer
  dwXCountChars As Integer
  dwYCountChars As Integer
  dwFillAttribute As Integer
  dwFlags As Integer
  wShowWindow As Smallint
  cbReserved2 As Smallint
  lpReserved2 As Integer
  hStdInput As Integer
  hStdOutput As Integer
  hStdError As Integer
End Type

Type PROCESS_INFORMATION
hProcess As Integer
hThread As Integer
dwProcessID As Integer
dwThreadID As Integer
End Type

Define NORMAL_PRIORITY_CLASS  H20
Define INFINITE-1

Declare Sub ExecuteAndWait(ByVal cmdLine As String)

Declare Function CloseHandle Lib "kernel32" (hObject As Integer) As
smallint
Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As
Integer,ByVal dwMilliseconds As Integer) As Integer

Declare Function CreateProcessA Lib "kernel32" (ByVal lpApplicationName As
Integer,
 ByVal lpCommandLine As String, ByVal lpProcessAttributes
As Integer,
 ByVal lpThreadAttributes As Integer, ByVal bInheritHandles
As Integer,
 ByVal dwCreationFlags As Integer, ByVal lpEnvironment As
Integer,
 ByVal lpCurrentDirectory As Integer, lpStartupInfo As
STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Integer

Sub Main
dim sCmd as string

sCmd = HomeDirectory$()  "NotePad.exe "
call ExecuteAndWait(sCmd)

End sub

Sub ExecuteAndWait(ByVal cmdLine As String)
Dim NameOfProc As PROCESS_INFORMATION,
NameStart As STARTUPINFO,
X As Integer

NameStart.cb = 256
Print CreateProcessA(0, cmdLine, 0, 0, 1, NORMAL_PRIORITY_CLASS, 0, 0,
NameStart, NameOfProc)
print NameOfProc.hProcess
Print WaitForSingleObject(NameOfProc.hProcess, INFINITE)
Print CloseHandle(NameOfProc.hProcess)
End Sub






Roy Chiappini [EMAIL PROTECTED] - 2000 02 27 14:25:15

Til:Mapinfo List [EMAIL PROTECTED]
cc:  (bcc: Peter Laulund/MI/KMS)
Vedrørende:MI MapBasic question





List:

Is there a way, from WITHIN MapBasic, to run a windows program AND not
return program control to the MapBasic program until the windows program
has completed operation?

Thanks

--
Roy N. Chiappini
Randa Enterprises
[EMAIL PROTECTED]
http://www.srv.net/~ziccardi/randa


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]





MI MapBasic: Copy from Clipboard

2000-02-28 Thread Leith Britt

Hello All,

I am writing a MB program that will find a particular site based upon a
selection in an Access form. When leaving Access I copy the info on to the
clipboard
then open MapInfo and start the program. I need to retrieve the info from
the clipboard and set it as a string. Does anybody know how this can be
done?
I know I can output the info as a file from Access and import it into the
program. The clipboard seemed like the easiest way to do it though.

Thanks for any info!

Leith C. Britt
GIS Specialist
Town of Cary
Ph. (919)-469-4383
Fax (919)-319-4597
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic question

2000-02-28 Thread Raymond Rivest

At 06:25 AM 2/27/00 -0700, Roy Chiappini wrote:
List:

Is there a way, from WITHIN MapBasic, to run a windows program AND not
return program control to the MapBasic program until the windows program
has completed operation?

Sure, just make sure you app is in fact a DLL and call your main form as 
modal :)

Hope this helps.


Thanks

--
Roy N. Chiappini
Randa Enterprises
[EMAIL PROTECTED]
http://www.srv.net/~ziccardi/randa


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Raymond Rivest
Global Geomatics Inc.
Tel: (450) 668-4949, Fax: (450) 668-2822

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic question

2000-02-27 Thread Roy Chiappini

List:

Is there a way, from WITHIN MapBasic, to run a windows program AND not
return program control to the MapBasic program until the windows program
has completed operation?

Thanks

--
Roy N. Chiappini
Randa Enterprises
[EMAIL PROTECTED]
http://www.srv.net/~ziccardi/randa


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic and Visual Basic

2000-02-20 Thread Brad Mathews

Harald,

It has been a while since I have done this, but you need to use DDE. You can
transmit data back and forth, but I do not recall the method (and my source
code is long gone). A little study of the DDE interface should point the
way.

The other option, which may or may not work in your situation, is to use VB
as your primary interface and use OLE to interface with Mapinfo Pro
(integrated mapping). You can run Mapbasic function and all kinds of neat
things this way. It is more stable, more flexible and more powerful.

- Brad

 -Original Message-
 From: Harald Schoelzel [SMTP:[EMAIL PROTECTED]]
 Sent: Saturday, February 19, 2000 8:25 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  MI MapBasic and Visual Basic
 
 I'd like to include an existing VB application into my MapBasic
 application
 - mainly because I find it somewhat cumbersome to design forms etc in MB.
 
 What would be the best way to include the VB app and enable dataexchange
 from VB to MB? And what would be the syntax for that, eg if I used DDE can
 I
 initiate the data request through the DDEInitiate command with Visual
 Basic
 and MyVPapp.EXE as topic/ statement. Would the VB application have to be
 set
 up as a server/ client?
 
 Could all that be done through OLE.
 
 Thanks for your efforts and please copy reply to  my e-mail.
 
 Harald Schölzel
 Economist Civil Engineer
 c/o SOPAC South Pacific Applied Geoscience Commission
 Private Mail Bag
 Suva, Fiji
 Tel: Business (679) 381 377 private (679) 386 236
 Fax: (679) 370 040
 Mailto:[EMAIL PROTECTED]
 URL: http://www.sopac.org.fj/wru
 Mirror URL: http://www.sidsnet.org/pacific/sopac/wru
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic and Visual Basic

2000-02-19 Thread Harald Schoelzel

I'd like to include an existing VB application into my MapBasic application
- mainly because I find it somewhat cumbersome to design forms etc in MB.

What would be the best way to include the VB app and enable dataexchange
from VB to MB? And what would be the syntax for that, eg if I used DDE can I
initiate the data request through the DDEInitiate command with Visual Basic
and MyVPapp.EXE as topic/ statement. Would the VB application have to be set
up as a server/ client?

Could all that be done through OLE.

Thanks for your efforts and please copy reply to  my e-mail.

Harald Schölzel
Economist Civil Engineer
c/o SOPAC South Pacific Applied Geoscience Commission
Private Mail Bag
Suva, Fiji
Tel: Business (679) 381 377 private (679) 386 236
Fax: (679) 370 040
Mailto:[EMAIL PROTECTED]
URL: http://www.sopac.org.fj/wru
Mirror URL: http://www.sidsnet.org/pacific/sopac/wru

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI: MapBasic SearchPoint SearchRect commands

2000-02-14 Thread Van Uitregt, John

Hi,

I am seeking assistance in the use of the SearchPoint and SearchRect
commands in MapBasic please. My main problem is that I cannot guarantee
correct or predictable results.

I have a lines map and a points map. The lines maps represents a sewer
system and the points map represents the access points at the ends of
the lines. I am wanting to determine the points at the end of each line,
so that I can verify flow direction.

I have written the mapbasic code to successfully do this using the
CreateCircle function and geographical analysis commands; however; it
takes some 50+ hours to run in NT 4 on a Pentium III at 500mhz and 250mb
RAM for 30,000 sewer lines. This equates to approx 1.8 billion
comparisons.

The problem I am having with the search commands is that they do not
always yield correct results, and are unpredictable. As stated in the
texts, the SearchPoint function relies on a pixel distance for
determining points selection. This depends on zoom width. However,
having specified the SearchRectangle coordinates, I would expect to
overcome the use of pixels, but it doesn't seem to be the case.

Any help will be greatly appreciated. Thanks in advance.

___
Regards ...
John van Uitregt,  GIS Analyst
Logan City Council, Queensland, Australia
Tel. 61-7-38265138 Fax 61-7-38080014
Email: mailto:[EMAIL PROTECTED]
Web Site: http://www.logan.qld.gov.au

**
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic false compile

2000-02-14 Thread Geografía y Electrónica, SA de CV

Hi, can someone tell me why this code compiles ok in MapBasic 4.1?   It
shouldn't, should it?  Note the extra Sub parameter 'SayYes'.

-
Declare sub A ( Byval Data1, Byval Data2 as string, Byval SayYes as logical )

dim X1 as string
Call A ( "hello", X1, 0)
print X1

Sub A ( Byval Data1, Byval Data2 as string )
if SayYes then
Data2 = left$( Data1,2)
else
Data2="No"
end if
End sub
-


-
 Ing. Juan Pufleau Correa
Geografía y Electrónica, SA de CV
  Aguascalientes, Mexico
-
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic version

2000-02-14 Thread Greg Toomey
Title: MapBasic version 





Hello all


I have compiled a program in MapBasic V5.0 but need to run it on a MAC, i.e. only has MapInfo V4.1. To run this program on the MAC I need to change the header info. in the compiled program. 


I noticed somewhere that there was a program to change the version header in a compiled MapBasic program but can not remember where. Can anybody help me?

Thanks
Greg Toomey





MI MapBasic question

2000-01-28 Thread reijo . kiviniemi

Hi all MapInfoUsers !

I am looking for sourcecode to the MapBasic program Search and Replace, can
anybody help ?




TIA...

Reijo Kiviniemi
GIS-specialist
RegionGIs
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic training courses - Pro and Con?

2000-01-25 Thread Bill Thoen

If anyone here has taken or given MapBasic programming training
courses (official or otherwise), I would like to hear what you
thought of them. Specifically, what do you think were the good
points in material, presentation, excercises, examples, etc., and
what were the weakest spots? Also in the course you took or
presented, was anything left out you would have wanted or were
things included that weren't useful?

I'd appreciate your top 3 or so best and worst features of any
MapBasic course you took, since I'm working on something along
these lines. I'll summarize in a week or so, so you can email me
directly if you have a mind to speak your mind. Trainer's
thoughts and ideas are welcome too, and I'll respect your
anonymity if you wish.

Thanks!

- Bill Thoen
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic training courses - Pro and Con?

2000-01-25 Thread Matt Fowler

I took a class in MapBasic a couple of years ago at General Analytics in
McLean, VA.  High points included: excellent documentation, competent
instructor, one PC per student and real world in-class exercises.  Low
points included not enough time spent on in-class exercises.

Matt Fowler
Solid Earth, Inc.
109-B North Jefferson Street
Huntsville, AL  35801
(256) 536-0606
http://www.solidearth.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bill Thoen
Sent: Tuesday, January 25, 2000 12:57 PM
To: MapInfo-L
Subject: MI MapBasic training courses - Pro and Con?


If anyone here has taken or given MapBasic programming training
courses (official or otherwise), I would like to hear what you
thought of them. Specifically, what do you think were the good
points in material, presentation, excercises, examples, etc., and
what were the weakest spots? Also in the course you took or
presented, was anything left out you would have wanted or were
things included that weren't useful?

I'd appreciate your top 3 or so best and worst features of any
MapBasic course you took, since I'm working on something along
these lines. I'll summarize in a week or so, so you can email me
directly if you have a mind to speak your mind. Trainer's
thoughts and ideas are welcome too, and I'll respect your
anonymity if you wish.

Thanks!

- Bill Thoen
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic - problems with Dialog Remove statement

2000-01-19 Thread fannon_j



From: John Fannon@WRCPLC on 01/19/2000 04:03 PM


To:   [EMAIL PROTECTED]
cc:
Subject:  MapBasic - problems with Dialog Remove statement

I have a dialog that has several control buttons on it but no OKButton.  Each of
the buttons calls the same handler and the triggercontrol() function is used to
determine which button was pressed.  The problem is that I need to be able to
remove the dialog once a button has been selected.  I thought that the following
code would work:

Sub main
 dialog
  control button
   title "button1"
   id 1
   Calling handler
  control button
   title "button2"
   id 2
   Calling handler
End Sub

Sub handler

 Dialog Remove

 Do Case triggercontrol()

  Case 1
   call anotherRoutine
  Case 2
   call anotherRoutine
 End Case

End Sub


the dialog remove statement doesnt remove the dialog at all with the above code.
Yet if I take out the Do Case part it works fine!!I can't quite understand
this.  Does anybody know if this is a bug?  or is it that I'm not supposed to be
using it in this way?

well any help would be good...

thanks

John




**
John Fannon
GIS Group

WRc Plc
Frankland Rd
Blagrove
Swindon
SN5 8YF

email: [EMAIL PROTECTED]

Tel: 01793 865096
Fax: 01793 865001

**


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic - retrieving the ID of the editText control which user clicked in.

2000-01-04 Thread fannon_j



I have a dialog that has a number of EditText controls.  I want to determine
which of these the user selected last.

i know that the triggerControl() function can determine the last selected
control ID - but I need to determine the ID before the user dismisses the dialog
(eg with ok/cancel) and before another control is selected.

you can do this with other dialogs by having a handler that has the
triggercontrol() function within it.  But I don't think you can have a handler
for an editText box??

so how do I return the last selected control ID if the user clicks within an
EditText box??

I'd appreciate any suggestions

thanks,

John Fannon
GIS Specialist
WRc Plc
Swindon
UK

email: [EMAIL PROTECTED]


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic: using code to select a node

1999-12-30 Thread Nicholas Couch

I need to be able to select a node (IOW simulate a mouse click on a node) on a map 
using a Mapbasic command, via OLE in an Access application, but I can't find any such 
Mapbasic command. I am a newcomer to MapInfo, so perhaps there's something simple I've 
overlooked. Can anyone offer any help?

Thanks in advance,

Nicholas Couch
[EMAIL PROTECTED]


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic Utilitiy Tool

1999-12-24 Thread DDI

Hi
It's not a problem. There is CogoLinm from Juan Pufleau
[EMAIL PROTECTED]:
   http://members.xoom.com/geosoft99/gis/util/cogolinm.zip
But more usefull COGO.MBX is shareware on http://www.GreenwoodMap.com

If you have MapBasic - seek in samples code of Cogoline and change it as
you want.

Dima Omely
http://members.xoom.com/geosoft99/


decorp1 wrote:

 I would like to know if the Cogoline a MapBasic application utlity
 tool (MapInfo v4.1.2) which only have a feet and miles measurement
 units(English system) can also be configured to meters (Metric system)
 if this is so how can I do that? Or is there any MapBasic application
 similar to Cogoline that uses the metric system. Benjy S. Sta. Ana

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic - SELECT command problems

1999-12-21 Thread Richard . Burkmar

John,

MB will parse 'wherestatement' as a single 'token' or 'word' - which isn't
what you want.  You will probably be best off using the 'Run Command'
statement something like this:

Run Command "Select * From "  tables  " Where "  wherestatement 
" Into Selection"

'Run Command' causes the subsequent string to be parsed into its individual
tokens before being executed.

Richard Burkmar
ICL

-Original Message-
From: "fannon_j"@wrcplc.co.uk [mailto:"fannon_j"@wrcplc.co.uk]
Sent: 21 December 1999 09:14
To: [EMAIL PROTECTED]
Subject: MI MapBasic - SELECT command problems




I have a mapbasic program that gets an SQL statement from the user filling
in a
text box.  This statement is stored in a string variable and the program
runs
the select statement once the dialog is dismissed with OK.  Eg:

if commandinfo (CMD_INFO_DLG_OK) then

 Select * From tables Where wherestatement Into Selection

end if


the variable "tables" and "wherestatement" hold the user input table names
and
SQL where statement respectively.


currently this doesn't work!


The variable "tables" seems to be ok...but there is something about
using a
string variable for the where part of the statement which MapBasic doesn't
like.
Do I need to split up the wherestatement string variable into seperate
string
variables for the SELECT command to work?  Or is it something to do with
column
aliases (which I hate!) ?

If you have any ideas I'd be happy to here them!

cheers

John


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic : Distance point to line

1999-12-20 Thread Warren Vick, Europa Technologies Ltd.

Hello Véronique,

May I add to Bill's reply that a truly accurate implementation of
point-object distance is not very efficient to implement in MB as it
involves iteration through nodes. This is the reason why many utilities will
compromise accuracy by not calculating the true perpendicular distance.
Also, ensure that very long "straight" lines have a suitable number of
coincident nodes. This will reduce errors induced by the geometric straight
line vs. great circle path discrepancy.

Regards,
Warren Vick
Europa Technologies Ltd, U.K.
http://www.europa-tech.com

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Thoen
 Sent: Friday, December 17, 1999 6:57 PM
 To: V. VESTRI
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: MI MapBasic : Distance point to line


 The shortest distance between a point and a line is the length of
 a line originating at the point and intersecting the line
 perpendicularly (not necessaerily the midpoint). You also have to
 test the line's endpoints if a perpendicular intersection cannot
 be drawn from the point to a line segment.

 - Bill Thoen


 "V. VESTRI" wrote:
 
  Hello,
 
  Can you tell me how to calculate the minimum distance between one point
  and few lines or polylines with MapBasic ?
 
  It's the last point of my developpement and i don't have idea how i can
  do that.
  My MapBasic application is simple :
  - it create circle, using coordinates in a table
  - user define the radius
  - it select all line or polyline in the circle
  - it calculate the minimum distance between the circle centroid and this
  line or polyline
 
  I'm sorry for this very bad english ...
 
  Thanks a lot,
 
  Véronique VESTRI
  Ingénieur S.I.G.
  [EMAIL PROTECTED]
 
  ASCOPARG
  Surveillance de la qualité de l'air
  dans la région grenobloise
  FRANCE
 
  --
  To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
  "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MAPBASIC

1999-12-20 Thread Crompton, Mark

Hi All,

Even though Fraser asked about the Spy tool, I would like to bring to
everyone's attention the book mentioned below:

WHITENER AND RYKER (authors) - MAPBASIC DEVELOPER'S GUIDE

Anyone wishing to get into MapBasic programming - BUY THIS BOOK.  It is
without doubt the most useful resource I have ever seen or used for
MapBasic.

Just my $.02
Mark

-Original Message-
From: Fraser Gardiner [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 17, 1999 11:08 AM
To: MapInfo-L
Subject: MI Spy tool


I am working my way through Whitener and Ryker's MapBasic Developer's Guide.
They refer to a Visual C++ utility called Spy that enables a developer to
get information on dialog controls by clicking on them. Can Spy be used
independently of VC++, and if so, is there someone who can send me a copy of
this or a similar utility?

Many thanks,

Fraser

*
Fraser Gardiner
Tel: 020 8451 9603
Mob: 07939 081357
Email: [EMAIL PROTECTED]
*

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic : Distance point to line

1999-12-17 Thread Josee Bouchard / Le Groupe KOREM

Véronique,

Il existe un programme MapBasic gratuit qui te permet d'effectuer ce calcul
entre deux tables. Il est disponible en anglais sur le site de la MapInfo-L
à http://www.directionsmag.com/tools/ (Regarde dans le Top 10)

Si tu le souhaites, je peux te le faire parvenir en français.
Josée


 Can you tell me how to calculate the minimum distance between one point
 and few lines or polylines with MapBasic ?

 It's the last point of my developpement and i don't have idea how i can
 do that.
 My MapBasic application is simple :
 - it create circle, using coordinates in a table
 - user define the radius
 - it select all line or polyline in the circle
 - it calculate the minimum distance between the circle centroid and this
 line or polyline

 I'm sorry for this very bad english ...

 Thanks a lot,

 Véronique VESTRI
 Ingénieur S.I.G.
 [EMAIL PROTECTED]

 ASCOPARG
 Surveillance de la qualité de l'air
 dans la région grenobloise
 FRANCE

 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

|| //   Josee Bouchard
||   // [EMAIL PROTECTED]
|| //   #ICQ 8348615
|| \\
||   \\Le Groupe KOREM inc.
|| \\  http://www.korem.com

680, Charest Est, Quebec (QC)
CANADA, G1K 3J4
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic utilities...

1999-12-16 Thread Alice Dobry

Hello,

I was curious if anyone might know where I could find utilities
written in MapBasic that would do the following:

  1. Convert TigerMap data to the format required by MapInfo.

  2. A MapBasic program invokable from the command line that
  would accept a bounding box and would generate a MapInfo
 map internally, then save it to a file as a gif or jpeg.

Any help would be greatly appreciated.

Alice.

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic: Reproject Statement

1999-12-07 Thread Martin Roundill

Hi All,

I just tried to use the 'reproject' mapbasic statement both from the
mapbasic window and within mapbasic code.
While MapInfo didn't kick up a fuss it totally ignored the statement ie it
had no effect at all.

Is it just me or doesn't this actually work?

I am running MI5.0 (and MB5.0)

TIA

Martin

===
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand
Ph +64 9 836 8000 ext 8344
Fax +64 9 836 8001
email [EMAIL PROTECTED]
===



--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Questions from a beginner

1999-12-02 Thread Jonathan Stokes

Hello all
And when I say beginner I mean it! be very warned.

what I need to do is the following (mapbasic 4.1 and mi 4.5)
I have just done an update column on a table and then a query into a
table called selection.
I then want to open a browser window for selection but only if there
have been any results from the query
(obviously I'll get an error message if I try to browse from the
selection and the query has not returned any results)

cheers

Jon 
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI Mapbasic utility

1999-12-01 Thread Crompton, Mark

Hi William,

I have written an application that takes a text, excel or access files with
limited cell site information and transforms it into MapInfo.  The resulting
map will show sectors with correct beamwidth and orientation, which the user
can then label however desired.  A copy of this utility has been sent to
Sprint PCS in Northern California.  The engineer it was sent to is an LCC
employee - Shirjeel Mirza.  If you contact him he should be able to help.
If not send me an email and I will send you a copy.

If you have other tables with additional information - Freq, PN, Colour
Code, Location Area, BSC (or whatever is relevant for your system) these can
be thematically added later providing you have a single reference column the
same across the tables (eg Site ID).  

E.g.
Here we have daily switch data downloaded from the web.  MapInfo provides a
dialog with a list of the columns.  The user picks a column, and then each
sector (pie segment) is colour coded depending on which view was selected.
This has also been done for Frequency ReUse (PN codes for CDMA), where the
user selects a sector and the reuses are shown.  Another tool we have is
neighbour lists - select a sector and display neighbours.  This has also
been done for traffic data...

If you have specific questions please do not hesitate to ask.
Hope this helps
Mark Crompton
Principal Engineer
LCC International Inc

-Original Message-
From: Young, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 29, 1999 9:27 AM
To: '[EMAIL PROTECTED]'
Subject: MI Mapbasic utility


I am hoping that someone might have a mapbasic utility that they would be 
willing to share. What I am looking for is a mapbasic utility for wireless 
that would label a cell site with the correct antenna orientation, that
would 
cross reference a site database and change the site symbol to either a line
reference, 
or pie wedge, as well as orientating it with the referenced azimuth,
beamwidth (in the case of a pie wedge), channel assignment, and site
name/number. Any assistance anyone could provide would be greatly
appreciated.


Sincerely,

William G. Young
Sprint PCS
RF Engineering,  Nashville, TN
E-mail:  [EMAIL PROTECTED]
Voice: (615) 345-7911
Fax:   (615) 248-4828
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic Programmers - FYI 5.x Bug

1999-11-17 Thread Richard . Burkmar

Cindy,

Thanks for the prompt and effective workaround.

Richard Burkmar.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 11 November 1999 19:56
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: MI MapBasic Programmers - FYI 5.x Bug




Regarding your posting below, here is a workaround.

Include "Menu.def"
Declare Sub Main

Sub Main
 Run Command "Run Menu Command " + Str$(M_FILE_SAVE_WORKSPACE)
End Sub

Cindy
MapInfo Technical Support


Dear MB developers,

If you have any MapBasic applications which use the line 'Run Menu Command
M_FILE_SAVE_WORKSPACE', they may fail to work properly under some
circumstances (see below) with MapInfo 5.x.

Richard Burkmar.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 09 November 1999 18:03
To: [EMAIL PROTECTED]
Subject: Re: MapBasic 5.x Bug




This is a bug in MapInfo 5.5 as well.  I will file it as a bug.
Unfortunately,
I don't have a workaround for this.

Cindy
MapInfo Technical Support


*


To:   TechSupport/MapInfo Corp@MapInfo Corp
cc:
Subject:  MapBasic 5.x Bug





 Tech-support,

 When I compile and run the following MapBasic 5.0 program, I get an error
 if I have previously run an SQL query and I have the 'save queries in
 workspaces' option set (i.e. if the workspace tries to save the query).
 Running 'save workspace' directly from the MapInfo menu is OK as is
 running the MBX if I have not first run an SQL query or running the MBX
 with the 'save queries in workspaces' option not set.

 Include "Menu.def"
 Declare Sub Main

 Sub Main
Run Menu Command M_FILE_SAVE_WORKSPACE
 End Sub

 This is causing us problems because we have a MapBasic App (originally
 written at version 4.x) which intercepts a user's request to save a
 workspace from the MapInfo file menu and runs some code to clear up
 application-specific tables before saving the workspace with a line like
 that shown above.  Now a customer has moved to version 5.x of MapInfo, and
 cannot save workspaces with queries (which they need to do) unless they
 first shut down the application.

 Do you have any workarounds or bug fixes for this problem?

 Richard Burkmar




--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]





--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Programmers - FYI 5.x Bug

1999-11-11 Thread Cindy_Makarowsky



Regarding your posting below, here is a workaround.

Include "Menu.def"
Declare Sub Main

Sub Main
 Run Command "Run Menu Command " + Str$(M_FILE_SAVE_WORKSPACE)
End Sub

Cindy
MapInfo Technical Support


Dear MB developers,

If you have any MapBasic applications which use the line 'Run Menu Command
M_FILE_SAVE_WORKSPACE', they may fail to work properly under some
circumstances (see below) with MapInfo 5.x.

Richard Burkmar.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 09 November 1999 18:03
To: [EMAIL PROTECTED]
Subject: Re: MapBasic 5.x Bug




This is a bug in MapInfo 5.5 as well.  I will file it as a bug.
Unfortunately,
I don't have a workaround for this.

Cindy
MapInfo Technical Support


*


To:   TechSupport/MapInfo Corp@MapInfo Corp
cc:
Subject:  MapBasic 5.x Bug





 Tech-support,

 When I compile and run the following MapBasic 5.0 program, I get an error
 if I have previously run an SQL query and I have the 'save queries in
 workspaces' option set (i.e. if the workspace tries to save the query).
 Running 'save workspace' directly from the MapInfo menu is OK as is
 running the MBX if I have not first run an SQL query or running the MBX
 with the 'save queries in workspaces' option not set.

 Include "Menu.def"
 Declare Sub Main

 Sub Main
Run Menu Command M_FILE_SAVE_WORKSPACE
 End Sub

 This is causing us problems because we have a MapBasic App (originally
 written at version 4.x) which intercepts a user's request to save a
 workspace from the MapInfo file menu and runs some code to clear up
 application-specific tables before saving the workspace with a line like
 that shown above.  Now a customer has moved to version 5.x of MapInfo, and
 cannot save workspaces with queries (which they need to do) unless they
 first shut down the application.

 Do you have any workarounds or bug fixes for this problem?

 Richard Burkmar




--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]






--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic

1999-11-03 Thread antondeg

Hi All

I am thinking of writing an enhanced editor for MapBasic.  With such
functions as compile entire project form the MBP file.  Before I start I am
interested in a some info from the users.

1. How many use and external text editor such as UltraEdit for coding?  And
if so which one?
2. What features would people be interested in seeing in an editor.

A question for those that know.
How long will MapBasic be around and is it worth my effort to do this or are
MapInfo going to improve there editor.

Either reply to the list to my personal e-mail

Thanks

Anton de Gruchy
-
MapIT - GIS Program development
35 Settlers Drive
Edgemead, 7441
Cape Town, South Africa
Ph: 27 021 5580256
Fax: 27 021 5590147
Cell: 082 855 9747
e-mail [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic 5.x Bug - workarounds anyone?

1999-11-01 Thread Richard . Burkmar

Dear MapBasic Programmers,

When I compile and run the following MapBasic 5.0 program, I get an error if
I have previously run an SQL query (i.e. if the workspace tries to save the
query).  Running 'save workspace' directly from the MapInfo menu is OK as is
running the MBX if I have not first run an SQL query.

Include "Menu.def"
Declare Sub Main

Sub Main
Run Menu Command M_FILE_SAVE_WORKSPACE  
End Sub

Although at first sight it might seem trivial, it is causing me problems
because I have a MapBasic App (originally written at version 4.x) which
intercepts a user's request to save a workspace from the MapInfo file menu
and runs some code to clear up application-specific temporary tables before
saving the workspace with a line like that shown above.  Now a customer has
moved to version 5.x of MapInfo, and cannot save workspaces with queries
(which they need to do) unless they first shut down the application (which
is very inconvenient).

Does anyone have any ideas for working round this problem?

Thanks in advance,

Richard Burkmar.
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic App PLEASE DO NOT SEND US E-mail THANK YOU

1999-10-28 Thread Intermark


- Original Message -
From: Jon Spinney [EMAIL PROTECTED]
To: 'Mapinfo User List' [EMAIL PROTECTED]
Sent: Wednesday, June 09, 1999 7:24 PM
Subject: MI MapBasic App


Hello all:

Does anyone know of a MapBasic utility, app, or batch that will allow me to
automatically create bmp images from workspaces?
I have about 1000 images to create, and a manual "save window as" effort is
far to intensive.

Thanks,

Jon Spinney
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI mapbasic input variables

1999-10-19 Thread Warren Vick, Europa Technologies Ltd.

Hello Scott,

 I would like to
 have one sub routine such as
 save copy C:\city.tab as E:\temp\city.tab
 in which the input variable city would represent the variable
 that the user has selected

You can use your CITY variable in an expression in table processing
commands. However, there is no "save copy" type command in MI. The easiest
thing to so is to open the selected table and save it again.

open table "c:\"+CITY as TO_COPY_SAVE
commit table TO_COPY_SAVE as "e:\"+CITY

With open and commit, you do not need to put ".tab" extensions in the
expression as MI assumes it. Also, it would be wise to have your directory
paths implemented as variables rather than hard-coded and also to check for
the existence of the copy table before attempting the copy. You can do this
with the FileExists() function.

Regards,
Warren Vick
Europa Technologies Ltd, U.K.
http://www.europa-tech.com

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI mapbasic input variables

1999-10-18 Thread Tom White

Scott,

It sounds like you want to construct strings that can be executed as
MapBasic commands.  The spirit of this idea is to do something like the
following:

Dim Cmd as string
Dim Path as string
Dim City as string

'-- to create a new table named after the value of City
Cmd = "Create Table " + City + "  (ID Char(32)) File "
Cmd = Cmd + chr$(34) + Path + Chr$(34) + " Type Native"
Run Command Cmd

Note: you may want to do the following:

1) Keep your mapbasic window open in MI Pro as you work so you can
become more familiar with MapBasic syntax (many menu choices result in
the commands being printed to the window).
2) read up on MapBasic functions such as CommandInfo, FileSaveAsDlg, etc
that can help you gain info on choices the user makes ( or should make).
 For example, CommandInfo(CMD_INFO_MENUITEM) returns an integer telling
you the ID of the menu item the user selected; this should help you give
the variable 'city' a meaningful value.
3) Become familiar with the 'Dialog' keyword if you're planning to build
dialogs using MapBasic.

- Tom
**
  Tom A. White, GIS Programmer / Analyst
  Schlosser Geographic Systems, Inc.
http://www.sgsi.com  [EMAIL PROTECTED]
 Two Union Sq. 601 Union St. Seattle, WA 98101 USA
 (206) 224 - 0800   fax: (206) 467 - 0458

-Original Message-
From:   Snashall, Scott [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, October 18, 1999 4:36 PM
To: '[EMAIL PROTECTED]'
Subject:MI mapbasic input variables

Hello all,

I am relatively new to mapbasic and programming in general. 

In the program I am working on 
I have created a pulldown menu which list various cities

ie 

Toronto
Chicago
Vancouver
Los Angeles etc

once the user has selected the city he wants and clicked the okay button
the city would be placed into a input variable ie 
CITY

I would like to 
have one sub routine such as

save copy C:\city.tab as E:\temp\city.tab
in which the input variable city would represent the variable that the
user
has selected

rather than doing

this 
IF CITY =  toronto then
save copy C:\Toronto.tab as E:temp\toronto.tab
else if city = Chicago then
save copy C:\Toronto.tab as E:temp\Chicago.tab

I am not to sure if this can be done in Mapinfo or if there is a
better way of doing this. If there is any short step solutions,
HELP would be much appreciated

thanks



--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
 
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI mapbasic input variables

1999-10-18 Thread Khairul Alam

Hi Scott, 

You may try Do Case statements as follows:

Dim city, msg  As String 

Do Case  city
Case  toronto 
 save copy C:\Toronto.tab as E:temp\toronto.tab
Case  Chicago 
 save copy C:\Toronto.tab as E:temp\Chicago.tab
Case xyz
 save copy C:\xyz.tab as E:temp\xyz.tab   
Case  Else
msg = "city is not in the database?"
End Case



Regards,


Khairul Alam
ECOWISE Environmental, Canberra, Australia
ph: 6270 7655

IF CITY =  toronto then
else if city = then



At 05:35 pm 18/10/1999 -0600, you wrote:
   Hello all,

I am relatively new to mapbasic and programming in general. 

In the program I am working on 
I have created a pulldown menu which list various cities

ie 

Toronto
Chicago
Vancouver
Los Angeles etc

once the user has selected the city he wants and clicked the okay button 
the city would be placed into a input variable ie 
CITY

I would like to 
have one sub routine such as

save copy C:\city.tab as E:\temp\city.tab
in which the input variable city would represent the variable that the user
has selected

rather than doing

this 
IF CITY =  toronto then
save copy C:\Toronto.tab as E:temp\toronto.tab
else if city = Chicago then
save copy C:\Toronto.tab as E:temp\Chicago.tab

   I am not to sure if this can be done in Mapinfo or if there is a
better way of doing this. If there is any short step solutions,
HELP would be much appreciated

thanks

   

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic question

1999-10-08 Thread Federico Waisman



Dear all,

I am using the "Save Window" function in MapBasic (same as MapInfo's "Save
Window As...") with
the Copyright option. With all filetypes (bmp, psd, tif, jpeg) the
copyright line shows fine, however, if you create a WMF file the copyright
line gets chopped.

Does anyone nows a fix for this?

Regards. Federico


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Shade statement - Responses (Thanks!)

1999-10-01 Thread Susan Yu

Hello!

I have received a couple of responses to my original question dealing with
'shade' statement for thematic mapping (individual values).  Thanks to Brad
and Antoine. I'll post their response in entirety for those who don't like
summaries. 

Briefly, the problem was that I am working on an application that, based on
a query, the resulting number of values to be mapped out can be varied.  I
wondered how I could use the shade statement by taking this problem into
account.

I have discovered that you can put the values into a string array variable
and execute the 'shade' statement by using the 'run command' statement.
Here is my code:

   dim counter, newsize as integer
   dim name_list as string
   dim names(5) as string  'this variable needs to be redim according to
newsize

   counter = 2
   name_list = Chr$(34) + names(1) + Chr$(34)
   Do While counter = newsize
  name_list = name_list + "," + Chr$(34) + names(counter) +  Chr$(34)
  counter = counter + 1
   Loop

   Run Command "Shade 2 With New_Dealer Values" + name_list 

I still don't know how to shade the polygons with black and white patterns
rather than the awful default colours.  If anyone knows how to do this...
I'm still looking for a solution.  Thanks again!  Hope this isn't too
confusing.  

Here are the 2 responses I got:

Note:   can yield the same result using Chr$(34) - it's based on
preference. :)

--- From Brad ---

I worked with strings and the run command statement

here is a snippet of the part that adds all the columns to map for a
pie/bar thematic map

sPieString = "shade window " + iEastCoastMap +" 1 With COL3"
For i = 1 to iNumCols-1
sPieString=sPieString+",COL" + str$(i+3)
Next
you need to work with the legend in a different manner

set legend
window iEastCoastMap
layer prev
display on
shades on
symbols on
title "Legend" Font ("Arial",0,8,0)
Ranges Font ("Arial",0,7,0)  auto   display on , auto display on ,
auto
display on , auto display on , auto display on , auto display on , auto
display on , auto display on , auto display on , auto display on , auto
display on , auto display on , auto display on 
ascending on

by having enough auto display ons to cover the max number of objects to
shade.
if you have only, for example, 3 then the rest are ignored

Brad
GeoInfo Solutions Ltd.
mailto:[EMAIL PROTECTED]
http://www.geoinfosolutions.com
phone/fax 250-656-7170

--- From Antoine ---
use the RUN COMMAND instruction..

exemple:

dim tmp as String
tmp = "Shade .. With ... bla bla bla "
tmp = tmp + "Values "
for i=0 to x
tmp = tmp +  + nameIndividualValue(i) +  + " Brush(" + param1(i)
+ "," + param2(i) + "," + param3(i) + "), "
Next
Run Command tmp

PS :  is an insertion of the caracter - " - into the string...

for the string stories, i'm not not sure to understand all you asked..
___

||//Antoine Gilbert
||   //  [EMAIL PROTECTED]
||  //#ICQ 9737371
||  \\
||   \\Le Groupe KOREM Inc.
||\\   http://www.korem.com
___


Thanks... 

Susan
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



FW: MI MapBasic Shade statement - Responses (Thanks!) - correction

1999-10-01 Thread Susan Yu

I'm sorry for this, but I meant to take out the part about not figuring out
the filling the polygons with black and white patterns.  I forgot that I
tried Antoine's technique.

With sincere apologies,
Susan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Susan Yu
Sent: Friday, October 01, 1999 9:39 AM
To: MapInfo-L (E-mail)
Subject: MI MapBasic Shade statement - Responses (Thanks!)


Hello!

I have received a couple of responses to my original question dealing with
'shade' statement for thematic mapping (individual values).  Thanks to Brad
and Antoine. I'll post their response in entirety for those who don't like
summaries. 

Briefly, the problem was that I am working on an application that, based on
a query, the resulting number of values to be mapped out can be varied.  I
wondered how I could use the shade statement by taking this problem into
account.

I have discovered that you can put the values into a string array variable
and execute the 'shade' statement by using the 'run command' statement.
Here is my code:

   dim counter, newsize as integer
   dim name_list as string
   dim names(5) as string  'this variable needs to be redim according to
newsize

   counter = 2
   name_list = Chr$(34) + names(1) + Chr$(34)
   Do While counter = newsize
  name_list = name_list + "," + Chr$(34) + names(counter) +  Chr$(34)
  counter = counter + 1
   Loop

   Run Command "Shade 2 With New_Dealer Values" + name_list 

I still don't know how to shade the polygons with black and white patterns
rather than the awful default colours.  If anyone knows how to do this...
I'm still looking for a solution.  Thanks again!  Hope this isn't too
confusing.  

Here are the 2 responses I got:

Note:  """" can yield the same result using Chr$(34) - it's based on
preference. :)

--- From Brad ---

I worked with strings and the run command statement

here is a snippet of the part that adds all the columns to map for a
pie/bar thematic map

sPieString = "shade window " + iEastCoastMap +" 1 With COL3"
For i = 1 to iNumCols-1
sPieString=sPieString+",COL" + str$(i+3)
Next
you need to work with the legend in a different manner

set legend
window iEastCoastMap
layer prev
display on
shades on
symbols on
title "Legend" Font ("Arial",0,8,0)
Ranges Font ("Arial",0,7,0)  auto   display on , auto display on ,
auto
display on , auto display on , auto display on , auto display on , auto
display on , auto display on , auto display on , auto display on , auto
display on , auto display on , auto display on 
ascending on

by having enough auto display ons to cover the max number of objects to
shade.
if you have only, for example, 3 then the rest are ignored

Brad
GeoInfo Solutions Ltd.
mailto:[EMAIL PROTECTED]
http://www.geoinfosolutions.com
phone/fax 250-656-7170

--- From Antoine ---
use the RUN COMMAND instruction..

exemple:

dim tmp as String
tmp = "Shade .. With ... bla bla bla "
tmp = tmp + "Values "
for i=0 to x
tmp = tmp + """" + nameIndividualValue(i) + """" + " Brush(" + param1(i)
+ "," + param2(i) + "," + param3(i) + "), "
Next
Run Command tmp

PS : """" is an insertion of the caracter - " - into the string...

for the string stories, i'm not not sure to understand all you asked..
___

||//Antoine Gilbert
||   //  [EMAIL PROTECTED]
||  //#ICQ 9737371
||  \\
||   \\Le Groupe KOREM Inc.
||\\   http://www.korem.com
___


Thanks... 

Susan
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic Shade statement

1999-10-01 Thread Humphrey, Ben

(Okay okay, here you go so everybody can read it! =)


Just to add to the list of suggestions, here's a little snippet of code from
an MBX I wrote to shade a variably sized list of polygons with individual
colors:

Table name is "neighbors", but could be any table that was formed from a
prior selection

fetch first from neighbors  'creates a text string of all sector 
'name values in order to
thematically 
'shade the layer

cstring = """" + neighbors.Sector_name + ""","
for i = 1 to tableinfo(neighbors, TAB_INFO_NROWS)-2
fetch next from neighbors
cstring = cstring + """" + Neighbors.Sector_name + ""","
next
fetch next from neighbors
cstring = cstring + """" + Neighbors.Sector_name + """"

Run Command "Shade window " +win_id+ " selection with Sector_Name values " +
cstring 'shades the layer

Hopefully this sheds a little light.  I posted a question to the list about
how to do this and didn't get exactly the answer I was looking for, but it
was enough to point me exactly where I wanted to go.

good luck,
Ben


 -Original Message-----
 From: Antoine Gilbert [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, September 30, 1999 11:46 AM
 To:   Susan Yu; [EMAIL PROTECTED]
 Subject:  Re: MI MapBasic Shade statement
 
 use the RUN COMMAND instruction..
 
 exemple:
 
 dim tmp as String
 tmp = "Shade .. With ... bla bla bla "
 tmp = tmp + "Values "
 for i=0 to x
 tmp = tmp + """" + nameIndividualValue(i) + """" + " Brush(" +
 param1(i)
 + "," + param2(i) + "," + param3(i) + "), "
 Next
 Run Command tmp
 
 PS : """" is an insertion of the caracter - " - into the string...
 
 for the string stories, i'm not not sure to understand all you asked..
 ___
 
 ||//Antoine Gilbert
 ||   //  [EMAIL PROTECTED]
 ||  //#ICQ 9737371
 ||  \\
 ||   \\Le Groupe KOREM Inc.
 ||\\   http://www.korem.com
 ___
 
 - Original Message -
 From: Susan Yu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 1999 10:31 AM
 Subject: MI MapBasic Shade statement
 
 
 Hello everyone,
 
 I was wondering if anyone can help me with a Map Basic problem I am
 having.
 I'm trying to automate a thematic map using the "Region, individual
 values,
 black and white" template.  This map is suppose to result from values
 extracted from a selection performed prior.
 
 The selection results with a list of names - and regions should be shaded
 according to which name it falls in.  I have managed to just get the
 names
 and the regions it falls under.  Not the shading part.
 
 Then I have to use the "Shade" statement to create the thematic map:
 
 Shade 3 With some_column
Values
   "x" Brush ...
   "yy" Brush ...
   "zz" Brush ...
etc
 
 My problem is that the list of names can be 3 or 23!  How do I code in
 Map
 Basic to dynamically list the names and assign a different brush style
 under
 the Shade statement?
 
 Another attempt: I put the names in an array variable.  I tried to list
 the
 values by putting them all in one variable  'name_list', where names(n)
 is
 the array variable containing the names:
 
 counter = 2
 name_list = Chr$(34) + names(1) + Chr$(34)
 do while counter = newsize
name_list = name_list + "," + Chr$(34) + names(counter) +  Chr$(34)
counter = counter + 1
 loop
 
 The problem with above is that 'name_list' is seen as just one long
 string
 rather than a list of strings, despite that I have put in double
 quotation
 marks (Chr$(34)).
 
 I also tried putting under 'values' a variable list with: names(1),
 names(2), names(3), ... to a certain number
 but if the selection results in a list of names smaller than the listed
 number of variables, then it doesn't work.  It seem to fail when there is
 no
 value for the rest of the listed variables.
 
 Or is there a way to call an existing MapInfo function and pre-assign all
 the values to automatically create the thematic map?
 
 The answer seem like it can be right under my nose but I can't see it.
 Any
 help would be appreciated.
 
 Thanks,
 Susan
 
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
 
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic Shade statement

1999-09-30 Thread Susan Yu

Hello everyone,

I was wondering if anyone can help me with a Map Basic problem I am having.
I'm trying to automate a thematic map using the "Region, individual values,
black and white" template.  This map is suppose to result from values
extracted from a selection performed prior.

The selection results with a list of names - and regions should be shaded
according to which name it falls in.  I have managed to just get the names
and the regions it falls under.  Not the shading part.

Then I have to use the "Shade" statement to create the thematic map:

Shade 3 With some_column
   Values
  "x" Brush ...
  "yy" Brush ...
  "zz" Brush ...
   etc

My problem is that the list of names can be 3 or 23!  How do I code in Map
Basic to dynamically list the names and assign a different brush style under
the Shade statement?  

Another attempt: I put the names in an array variable.  I tried to list the
values by putting them all in one variable  'name_list', where names(n) is
the array variable containing the names:

counter = 2
name_list = Chr$(34) + names(1) + Chr$(34)
do while counter = newsize
   name_list = name_list + "," + Chr$(34) + names(counter) +  Chr$(34)
   counter = counter + 1
loop

The problem with above is that 'name_list' is seen as just one long string
rather than a list of strings, despite that I have put in double quotation
marks (Chr$(34)).

I also tried putting under 'values' a variable list with: names(1),
names(2), names(3), ... to a certain number
but if the selection results in a list of names smaller than the listed
number of variables, then it doesn't work.  It seem to fail when there is no
value for the rest of the listed variables.

Or is there a way to call an existing MapInfo function and pre-assign all
the values to automatically create the thematic map?

The answer seem like it can be right under my nose but I can't see it.  Any
help would be appreciated.

Thanks,
Susan


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic DDE link with Internet Explorer - help required-Reply

1999-09-28 Thread Mike Eden

Hi David (- how are things in Merseyside?)  listers

I've recently been experimenting with IE4 / IE5 and its Active-X
component with Delphi to integrate web browsing in an application. Until
last month I didn't know that you could do this with IE. This is obivously
well-beyond the humble capabilities of MapBasic, but shows that
something is possible - however OLE would be better than DDE. 

You may (or may not!) like to know that I had no trouble running  ie with
the command line parameter of the html page I wanted to open with
MapInfo 4  ie 3 a few years ago:

sIE = "C:\windows\iexplore.exe"
sPage = "http://www.ThisShouldWork.co.uk/index.htm" 
sTemp = sIE + " " + sPage
Run application sTemp

What you may want can be found using the WinApi - sorry I don't have
the funtion to hand to run another app based upon the filename's
extension (ie .htm / .html) but somebody out there should know it. 

Hope this helps

Mike
__
Mike Eden
Project Consultant
MVA, MVA House, Woking
Surrey, GU21 1DD, UK
Email: [EMAIL PROTECTED]
Web: www.mva-group.com
Tel: +44(0)1483 728051
Fax: +44(0)1483 755207

 "Yarwood, Dave" [EMAIL PROTECTED]
28/September/1999 09:05am 

Dear all,

Has anyone got any experience / code for interacting with
Internet Explorer 4.x through DDE ? I want a user to be
able to access a map layer's metadata stored on an
intranet catalogue.

I can launch Internet Explorer from within MapBasic
but can't find the code to get the browser to open
the URL I want. 

Any help would be greatly appreciated.

Regards,

Dave Yarwood
Project Manager

Eurogise Team
City of Liverpool
4th Floor Millennium House, 60 Victoria St, Liverpool L1 6JN
tel +44 (0) 151 233 6707 fax +44 (0) 151 233 6770
[EMAIL PROTECTED]   http://www.eurogise.org

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact
[EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic disable all Icons in non MapInfo 5.5 toolbars

1999-09-20 Thread Thake, Peter

Hi Franck,

Try creating the ODBC link manually in Mapinfo and saving the table. Do this
both in Mapinfo v5.0 and v5.5. Open the .tab files in a text editor and
compare the contents. Maybe the syntax of the connect string is different?

Good luck!

Pete, Ordnance Survey, UK

-Original Message-
From: Franck Martin [mailto:[EMAIL PROTECTED]]
Sent: 18 September 1999 05:42
To: '[EMAIL PROTECTED]'
Subject: MI MapBasic disable all Icons in non MapInfo 5.5 toolbars
Importance: High


I have a MapBasic 5.0 program that makes calls to an ODBC SQL database.
Server Connect.

When the server disconnect is called all the Icons of all the non MapInfo
toolbars (Custom toolbars) become disabled.

What is funny is this behaviour exits only with MapInfo 5.5 not with MapInfo
5.0. The same MapBasic program runs perfectly under MI 5.0.

I'm puzzled. I have checked everywhere that all the opens are closed that
the data binding are unbound correctly but nothing changes.

HELP !!!

Cheers.

Franck Martin
Network and Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Web site: www.sopac.org.fj http://www.sopac.org.fj 

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI MapBasic - Multiple Files

1999-09-17 Thread Gordon . Stenhouse

Hi Folks,

I've written a small MapBasic program which imports only a few layers from
a DXF file
into a TAB file.  Unfortunately there are about 700 files I need to do this
with and
my program only lets me choose one at a time.
Could anyone give me any hints as to how to get a list of files so I can
stick them in
an array and use a For..Next Loop to do all the files in a directory (if
that's the correct
way to do it)?

Thanks in advance

Gordon Stenhouse
North of Scotland Water Authority

NOTE: The information in this email is confidential and may be legally
privileged. If you are not the intended recipient, you must not read, use
or disseminate that information. Although this email and any attachments
are believed to be free of any virus, or any other defect which might
affect any computer or IT system into which they are received or opened, it
 is the responsibility of the recipient to ensure that they are virus free
and no responsibility is accepted by North of Scotland Water Authority for
any loss or damage arising in any way from receipt or use thereof.


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic Demographic Buffering Tool

1999-09-17 Thread Eric Maranne

Try the Fuzz tool from the list.
Define and draw a distance dependant function that'll enable you to qualify 
objects around your point(s).
Define one or more new columns in in your target(household) objects table. 
Apply the distance function to this table, from your points location table.
The target table is now qualified in terms of shortest distance (straight 
flight of course)  from the nearest point. Use standard SQL to order your 
target table from this qualified field, select fields while summing your 
demographic variable (I know MI doesn't provide a running sum function, but 
you still have trial and error method)
Note that you can define a differential function too, that could similarly 
qualify your target's objects with social/income/proximity of collective 
transport/proximity of a road, etc ... You could even add an angular 
function to qualify in function of the location (if North South 
transportation is globally easier than East West for example...) but it may 
be overkill ...

The other way is to buy Vertical Mapper, that'll do a huff based analisys, 
with powerfull tools and visualisation;

Last way is to work with MI buffers, but it's pretty difficult when dealing 
with multiple points if your demographic table isn't regular and evenly 
distributed in space, you may have weird results in this latter case. It 
certainly is depending on what you're after ...

Eric.

-Message d'origine-
De: Kent Hargesheimer [SMTP:[EMAIL PROTECTED]]
Date:   jeudi 16 septembre 1999 19:54
A:  MapInfo-L
Objet:  MI MapBasic Demographic Buffering Tool

Listers-

I have a retail client in need of a tool that will draw a buffer around a
point or set of points to capture a specified count of a demographic
variable (such as 100,000 people or households).

Does anyone have a MapBasic tool that does this?

Thanks,

Kent Hargesheimer
Senior Consultant
SRC - Extending the Reach of Micromarketing
603 Chadfield Way N.E.
Leesburg, VA 20176-4823
Tel 703.737.7739 Fax 703.737.7719
Website: http://www.extendthereach.com
SRC in Action: http://www.demographicsnow.com





--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic - Multiple Files

1999-09-17 Thread Tom White

An alternative is to make eek! a couple of windows API function calls.
 If you have a manual on API functions handy, check out these two:

FindFirstFile Lib "kernel32"
FindNextFile Lib "kernel32"

You can declare them in mb and write a function which finds the files
for you automatically (once you've retrieved the directory of interest
from the user).  And if you don't know how to do it already, you'll be
glad once you learn how to call API functions!

- Tom
**
  Tom A. White, GIS Programmer / Analyst
  Schlosser Geographic Systems, Inc.
http://www.sgsi.com  [EMAIL PROTECTED]
 Two Union Sq. 601 Union St. Seattle, WA 98101 USA
 (206) 224 - 0800   fax: (206) 467 - 0458

-Original Message-
From:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:  Friday, September 17, 1999 6:43 AM
To:[EMAIL PROTECTED]
Subject:   MI MapBasic - Multiple Files

Hi Folks,

I've written a small MapBasic program which imports only a few layers from
a DXF file
into a TAB file.  Unfortunately there are about 700 files I need to do this
with and
my program only lets me choose one at a time.
Could anyone give me any hints as to how to get a list of files so I can
stick them in
an array and use a For..Next Loop to do all the files in a directory (if
that's the correct
way to do it)?

Thanks in advance

Gordon Stenhouse
North of Scotland Water Authority

NOTE: The information in this email is confidential and may be legally
privileged. If you are not the intended recipient, you must not read, use
or disseminate that information. Although this email and any attachments
are believed to be free of any virus, or any other defect which might
affect any computer or IT system into which they are received or opened, it
 is the responsibility of the recipient to ensure that they are virus free
and no responsibility is accepted by North of Scotland Water Authority for
any loss or damage arising in any way from receipt or use thereof.


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic - Multiple Files

1999-09-17 Thread Lepage, Mike L (Mike)** CTR **

you could use the dos dir command to get a list and redirect it to a file.

ie:
dir *.* tempfile.txt

what the dir command would normally show on the screen is now put into the
tempfile.txt file.
you could then load the file in excell or something to trim out the extra
data/columns you don't want.

hope it helps.

Mike Lepage, B.Sc.
Senior RF Engineer
Wireless Professional Services
Lucent Technologies
314-891-2130
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 17, 1999 8:43 AM
To: [EMAIL PROTECTED]
Subject: MI MapBasic - Multiple Files


Hi Folks,

I've written a small MapBasic program which imports only a few layers from
a DXF file
into a TAB file.  Unfortunately there are about 700 files I need to do this
with and
my program only lets me choose one at a time.
Could anyone give me any hints as to how to get a list of files so I can
stick them in
an array and use a For..Next Loop to do all the files in a directory (if
that's the correct
way to do it)?

Thanks in advance

Gordon Stenhouse
North of Scotland Water Authority

NOTE: The information in this email is confidential and may be legally
privileged. If you are not the intended recipient, you must not read, use
or disseminate that information. Although this email and any attachments
are believed to be free of any virus, or any other defect which might
affect any computer or IT system into which they are received or opened, it
 is the responsibility of the recipient to ensure that they are virus free
and no responsibility is accepted by North of Scotland Water Authority for
any loss or damage arising in any way from receipt or use thereof.


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic - Multiple Files

1999-09-17 Thread Ahmet Dabanli

Goto Dos Prompt
write
c:\ dir *.dxf   dxffiles.txt

In Mapinfo Open Table
make the file type TXT and select dxffiles.txt
open it
save a copy of this file (let say mydxfs.tab)
open mydxfs
open mapbasic window
write
UPDATE mydxfs SET col1 = write$(col1,len(col1)-44)  'because in dos file
names start in 44th position
this command leaves only file names including long file names (but in
windows 95/98)
delete first and last few lines which are not filenames
Pack yout table

now you can make For..Next

Best Regards




-Original Message-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: 17 Eyll 1999 Cuma 17:52
Subject: MI MapBasic - Multiple Files


Hi Folks,

I've written a small MapBasic program which imports only a few layers from
a DXF file
into a TAB file.  Unfortunately there are about 700 files I need to do this
with and
my program only lets me choose one at a time.
Could anyone give me any hints as to how to get a list of files so I can
stick them in
an array and use a For..Next Loop to do all the files in a directory (if
that's the correct
way to do it)?

Thanks in advance

Gordon Stenhouse
North of Scotland Water Authority

NOTE: The information in this email is confidential and may be legally
privileged. If you are not the intended recipient, you must not read, use
or disseminate that information. Although this email and any attachments
are believed to be free of any virus, or any other defect which might
affect any computer or IT system into which they are received or opened, it
 is the responsibility of the recipient to ensure that they are virus free
and no responsibility is accepted by North of Scotland Water Authority for
any loss or damage arising in any way from receipt or use thereof.


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic Demographic Buffering Tool

1999-09-16 Thread Steve Schnick

Kent,

Select the points in question, then choose Objects|Buffer... and it will
draw a buffer around the selected points with a given radius.  Then, you can
use the Boundary Select Tool to select points within the new buffer polygon.

Hope that helps.

Steve

-Original Message-
From: Kent Hargesheimer [EMAIL PROTECTED]
To: MapInfo-L [EMAIL PROTECTED]
Date: Thursday, September 16, 1999 1:19 PM
Subject: MI MapBasic Demographic Buffering Tool


Listers-

I have a retail client in need of a tool that will draw a buffer around a
point or set of points to capture a specified count of a demographic
variable (such as 100,000 people or households).

Does anyone have a MapBasic tool that does this?

Thanks,

Kent Hargesheimer
Senior Consultant
SRC - Extending the Reach of Micromarketing
603 Chadfield Way N.E.
Leesburg, VA 20176-4823
Tel 703.737.7739 Fax 703.737.7719
Website: http://www.extendthereach.com
SRC in Action: http://www.demographicsnow.com





--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic Demographic Buffering Tool

1999-09-16 Thread Serge Dumoulin

I think what he was looking for was to buffer out from a location UNTIL a
certain value is reached

what is your demographic breakdown? what I mean is it would be nice if
you were a the finest "granularity" which is at the block group level as
opposed to Census Tractsbut regardless of what your granularity is you
can always compute a buffer that bisects these until you meet your
threshold not very difficult to do. I just don't have it coded..

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Schnick
Sent: Thursday, September 16, 1999 14:22
To: [EMAIL PROTECTED]; MapInfo-L
Subject: Re: MI MapBasic Demographic Buffering Tool


Kent,

Select the points in question, then choose Objects|Buffer... and it will
draw a buffer around the selected points with a given radius.  Then, you can
use the Boundary Select Tool to select points within the new buffer polygon.

Hope that helps.

Steve

-Original Message-
From: Kent Hargesheimer [EMAIL PROTECTED]
To: MapInfo-L [EMAIL PROTECTED]
Date: Thursday, September 16, 1999 1:19 PM
Subject: MI MapBasic Demographic Buffering Tool


Listers-

I have a retail client in need of a tool that will draw a buffer around a
point or set of points to capture a specified count of a demographic
variable (such as 100,000 people or households).

Does anyone have a MapBasic tool that does this?

Thanks,

Kent Hargesheimer
Senior Consultant
SRC - Extending the Reach of Micromarketing
603 Chadfield Way N.E.
Leesburg, VA 20176-4823
Tel 703.737.7739 Fax 703.737.7719
Website: http://www.extendthereach.com
SRC in Action: http://www.demographicsnow.com





--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI mapbasic pixshow-bug with workspaces

1999-09-10 Thread Ryan Richter



Just wanted to let 
everyone know of a small bug that has been bothering the hell out of me. I 
downloaded the mapbasic pixshow utility so that I could create hotlinks from 
points to images. Well it turns out that all will run smoothly until you 
save your work in a workspace. After doing this, when you use the hotlink 
and the image opens up, when you are done viewing the image and click the "X" in 
the corner to close it, you get that fatal error that you have performed 
an illegal operation and that MapInfo is shutting down. 


What a horrible sight 
that is. I have tested this theory a number of times to make sure, and 
that is what the problem seems to be. If anyone know how to fix this, or 
knows what I am doing wrong I would love to hear from you.

Thanking you in 
advance,

Ryan




MI Mapbasic application for wireless

1999-09-08 Thread Teguh Yulianto

Does anyone know how to understand or to find references about programming
with mapbasic particulary in telecom/wireless aplication?
Any inform will be very apreciated.
Thank you
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Mapbasic DLL programming question

1999-09-02 Thread Karl Kliparchuk

Hi everybody,

I have a MapBasic programming question.  I am trying to link to a DLL
but when I run my MBX I get the message "Unable to load library abc.dll.
Unable to link to external library abc.dll".  Has anyone come across
this before?  I heard from MapInfo that only 32 bit dll's are supported
and this is a 32 bit dll so that shouldn't be the problem.

The dll is in C.  A snippet of one of the functions in the .h file is:

ABC_OBJECT_C_API ABC_MsgNum ABC_SessionCreate
(ABC_SESSION_HANDLE *sessionHandle);  -- note that sessionHandle has an
"*" infront of it.
ABC_SESSION_HANDLE is typedef'd as an unsigned long.

In my .MB program declared the function as:

Declare Function ABC_sessionCreate LIB "abc.dll" 
  (ABC_sessionHandle As Integer) As Integer

The dll is called "abc.dll", all lower-case letters.  My mbx is stored
in the same subdirectory as the dll.

I defined ABC_sessionHandle as an Integer.

My function call is:
check_status = ABC_sessionCreate (ABC_sessionHandle)
At this point I get the unable to load dll error message.

Any help is greatly appreciated.

Karl

-- 
_

Terratech Mapping Services Inc.
Suite 201 - 7112 Russell Avenue
Burnaby, British ColumbiaProviding
CANADA   V5J 4R9 Geographic Solutions...

Tel: (604) 437-MAPS (6277)   Email: [EMAIL PROTECTED]
Fax: (604) 433-5715  http://www.tms.bc.ca
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI mapbasic window size

1999-08-23 Thread Joyce, Tammy DNRW


MapInfo users,
I don't have mapbasic but i do run repetitive operations in the mapbasic 
window.
Is there a way to expand the amount of text i can put in this window?
Thanks,
Tammy Joyce
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI mapbasic window size

1999-08-23 Thread Yas NaKayama


You mean to change the size of font and all that?

If you are wanting to change the font size in Mapbasic, then
First reset the Text style, then,
In mapbasic window issu..
Set Window 1002 Font CurrentFont()

This should reset to whatever the font and font size you want to use

It this is not what you are asking,  ...???

Yas
 - - - - - - - - - - - - - - -- - - - - - - - -- --- -- -- --- - - - - - 
 - -  -
MapInfo users,
I don't have mapbasic but i do run repetitive operations in the mapbasic
window.
Is there a way to expand the amount of text i can put in this window?
Thanks,
Tammy Joyce
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI MapBasic File Size Exceed 64KB

1999-08-18 Thread Mapmail

Try using a plain text editor, that's all.
(I can recommend the text editor UltraEdit, you can download it from
www.ultraedit.com)

In the future, just write your program outside of MapBasic and then use the
'Compile from file'  option in MapBasic.

 -Original Message-
 From: IDS [SMTP:[EMAIL PROTECTED]]
 Sent: 18. august 1999 09:30
 To:   [EMAIL PROTECTED]
 Subject:  MI MapBasic File Size Exceed 64KB
 
 Hello,
 
 The mapbasic program that I was writing exceeded 64 KB and consequently
 I am not able to open the same.
 
 How can I retrieve the same ? I am in deep trouble.
 
 Any help/suggestion will be welcome.
 
 Thank you.
 
 Sanjoy Dassarma
 **
 Integrated Digital Systems
 4B Sundaram
 46F Rafi Ahmed Kidwai Road
 Calcutta 700 016
 Tel : 91 33 2290541/2295265
 Fax : 91 33 4667974
 **
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI MapBasic - Inserting Values

1999-08-14 Thread Bill Thoen

That's not true. I insert objects with data elements all the
time. However, I do put the object first.

(Ce n'est pas vrai. J'insère des objets avec des éléments
d'informations toute
l'heure. Cependant, je mets l'objet d'abord.)

- Bill Thoen

Antoine Gilbert wrote:
 
 in a mapbasic you can't insert objects elements in the same time of data
 element..
 
 insert your data elements first and after use update statement for insert
 your object element
 
 i don't speak english...
 
 hehe
 
 - Original Message -
 From: Steve Wallace [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 13, 1999 4:23 PM
 Subject: MI MapBasic - Inserting Values
 
 I'm perplexed. The following line of code works if I add a breakpoint to my
 MapBasic program and paste the line of code into the MapBasic window, but
 it will not work in the compiled code.
 
 Insert Into Discussion (Date_Zulu, Time_Zulu, Wind_KTS, Obj) Values (18,
 "1200Z", 35, CreatePoint(00, 00) )
 
 Ideas?
 
 Thanks!
 
 
 Steve Wallace
 GIS  Market Information Manager
 Florida Farm Bureau Insurance Companies
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
 
 
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



  1   2   >