Re: [MI-L] Mapbasic and Delphi 2005 Dll

2006-10-27 Thread Uffe Kousgaard
I have updated your code to properly show a form using Delphi 2005 (or any 
other Delphi for that matter).


The mapbasic declaration looks like this:
Declare Sub AssetForm Lib somename.dll

Regards
Uffe

- Original Message - 
From: Nathan Woodrow

To: MapInfo-L@lists.directionsmag.com
Sent: Monday, October 23, 2006 12:39 AM
Subject: [MI-L] Mapbasic and Delphi 2005 Dll


Procedure AssetForm; StdCall;
Var
 AForm: TAssetCaptureForm
Begin
 AForm:= TAssetCaptureForm.Create(Nil);
 AForm.showmodal;
 AForm.free;
End;

Exports
 AssetForm;

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] Mapbasic and Delphi 2005 Dll

2006-10-24 Thread Trey
The mail from Monday I sent from the office got lost some where so I do it 
again.

You can go to my web site in the download section and get UltraMsg
I wrote this back in 1999 and the zip file has all the source and examples for 
MBX's.  About half way down the page:
http://www.wap3.com/download/index.shtml

The main thing on creating forms in DLL is to do a create and get the handle, 
then set up position/size, title, fonts, data, and then show the form and 
finally you have to destroy it.

UltraMsg provides, as its name says, it is a Rich Text Editor.
Plus just about every type of conversion and math, like real XOR, string 
search and replace and many, many more.

To recompile the dll, it should work as is, you will need to get HyperString.
After scouring the net for a couple of hours it looks as though EFD Systems 
and Ernie Deel [author] have dissappeared.
So in lieu of any copywrit stuff you can download the last D6 free version 
from here on my web:
http://www.wap3.com/download/hstr540.zip


On Sunday 22 October 2006 5:39 pm, Nathan Woodrow wrote:
 Hi All,

 Just a little help with a Dll, I have created using Delphi 2005.

 The Delphi project contains the Dll and a Unit(Form) which I want to be
 able to call from mapbasic.

 I have complied the Dll and complied my little mapbasic code that calls
 the Dll procedure, but however when I run the mbx, mapinfo shows up a
 error saying Memory can not be read.

 I was just wondering can Delphi 2005 make Dll's that can export
 functions that mapbasic can call on, if so how?

 An Example the Delphi code:

 Procedure AssetForm; StdCall;
 Var Aform: TAssetCaptureForm
 Begin
 AForm:= TAssetCaptureForm.Create(Nil);
 End;

 Exports
 AssetForm;


 I don't have much code written up as I am still trying to test this way
 of doing a few things, but so far just getting the form to show up is
 giving me a headache.

 Thanks

 Nathan Woodrow
 GIS/Asset Support Officer
 Warwick Shire Council
 Ph: (07) 4661 0463

 Email: [EMAIL PROTECTED]

-- 
Failure is not an option...
it comes standard with all Microsoft products.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic Programs

2006-09-04 Thread Driver, Greg 9434
Title: Message



James,

One 
option would be to embed a map window or browserwithin your dialog box and 
allow the user to interact with this map, so you wouldn't have to exit the 
dialog box. You'd have to use the 'Control DocumentWIndow' clause within 
your dialog box to embed the map/browser window and also set up some buttons to 
allow the user to select, zoom  pan around the map window. For an 
example on how to do it have a look at the Distance Calculator tool that ships 
with MapInfo and the code that comes with MapBasic. 

HTH
Greg Driver 
System 
Administrator Applications Support ICT NOT PROTECTIVELY MARKED 

  
  -Original Message-From: James Stott 
  [mailto:[EMAIL PROTECTED] Sent: 04 September 2006 
  15:48To: MapInfo-L@lists.directionsmag.comSubject: 
  [MI-L] MapBasic Programs
  
  
  All,
  
  I am trying to work out if it is 
  possible to write a MapBasic program that allows you to be able to select 
  things from mapper / browser windows while the program is running, like you 
  can do with the image registration tool.
  
  Does anyone know if this is 
  possible? Whenever I write a MapBasic program you can never select from 
  outside the programs dialog window.
  
  Regards,
  
  James
  
  
  
  This 
  Electronic Transmission is intended only for the attention of the addressee. 
  It may contain privileged and confidential information. If you are not the 
  person for whom it is intended, you must not copy, distribute or take any 
  action in reliance on it. If you have received this electronic transmission in 
  error please notify us immediately by telephone, delete the transmission and 
  destroy any hard copies. 
  Nicholas 
  Pearson Associates has used all reasonable efforts to ensure that this message 
  and any attachments are free from viruses. 
  
  
  Nicholas 
  Pearson 
  Associates 
  
  Environmental 
  Planners - Landscape 
  Architects - Ecologists 
  30 
  Brock Street, 
  Bath,BA1 
  2LN 
  Tel: 
  +44 (0) 1225 445548 Fax: +44 (0) 1225 312387 
  www.npaconsult.co.uk 
  
  
  
  



Internet communications are not secure and therefore Surrey Police does not accept legal responsibility for the contents of this message.  This email and any attachments may be confidential. They may contain privileged information and are intended for the named addressee (s) only. They must not be distributed without our consent. If you are not the intended recipient, please notify us immediately and delete the message and any attachments from your computer, do not disclose, distribute, or retain this email or any part of it. Unless expressly stated, opinions in this email are those of the individual sender, and not of Surrey Police. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. Surrey Police reserves the right to monitor all email communications through their networks.


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] Mapbasic Vertical Mapper

2006-08-31 Thread Bill Thoen
On Thu, Aug 31, 2006 at 12:25:13PM +0100, Jackson, Simon (Capita Symonds) wrote:
 Ok, I have the S-Dev-Kit.
 I need to tie MapBasic into VM so that I can create some batch routine
 for subtracting some grids, a grid query and outputting as ascii.  I
 asked this awhile back and got not much reply.  I assume it is possible?
 Any good links to sources that maybe able to help?

According to the manual, it should be able ot do that. However, I was a
little dissappointed with Vertical Mapper SDK. It's a product that's
needed, but this implementation looks more like an afterthought that a
typical solid MapInfo product. About a month ago I sent the following to
MapInfo Tech Support describing some problems I had with it but still have
not had a response. 

1. If I develop an MBX in my own directory with calls to the vm SDK
functions, they don't work. 

2. If I copy all the vm DLLs to the directory where my MBX runs from, the
applications works, but the VM progress bars don't show.

3. If I load Vertical Mapper into the MapInfo environmemt first, and I'm
running my MBX from my own directory, and I've copied all the vm DLLs to
that directory, everything works and the VM progress bars show.

4. If I run my MBX from the vm directory, I don't have to copy any DLLs,
but it behaves as in 2 and 3 above.

5. The SDK manual needs some work. There are a number of mistakes and at
least one function undocumented (vmGetPRogressTextCallback() used in
Batch.mb). Documentation about parameters whose values depend on units
(e.g. height, coordinates, radius etc. as in vmViewshed()) needs to include
what units are assumed. Also, the documentation fails to describe the
return values from many functions. If it doesn't matter, these should be
subroutines, not functions, and if it does matter, they need to be
documented.
 
So what is the proper way to develop, distribute and install MBX
applications that use the vm SDK? I don't want to put applications in the
vm directory because that will clutter up that directory. Also, you need
Admin privilege to write to directories in the Program Files tree.

I don't want to have to copy DLLs to each directory where my MBX's may be
installed. That gets into legal and user-screwup issues. Besides, unless VM
is running, they won't work properly anyway if I do that.

The vnDev.def file assumes that the vm DLLs are in the application
directory or at least in the search path. Standard installation of Vertical
Mapper doesn't guarantee this.

The manual says nothing about where to install the sdk or how to integrate
MBX's with Vertical Mapper so that they actually work. I think the
assumption is that MBXs go in the vm directory and that VM is loaded into
MapInfo. If it has to be that way, then they should say so, and in any case
that's not an ideal solution due to privilege issues and the fact that MBXs
often come with their own baggage in terms of data and configuration files
and will potentially make a mess of the vm directory.

So, can you give me some guidance?

- Bill Thoen

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MAPBASIC Vertical Mapper

2006-08-10 Thread Neil Havermale








This process can be created with a script
in MapCalc and its trial version is available at:



http://www.farmgis.com/products/software/mapcalc/default.asp



And if you have further interest there are
a number of tutorials on spatial analysis at:



http://www.innovativegis.com/basis/Senarios/Default.html



MidNight Mapper

Aka neil















From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jackson, Simon (Capita Symonds)
Sent: Wednesday, August 09, 2006
6:37 PM
To:
mapinfo-l@lists.directionsmag.com
Subject: [MI-L] MAPBASIC 
Vertical Mapper





Is there a way I can get MapBasic to tie in with
vertical mapper so that I can attempt to create a batch grid processing system.



Basically.



Interpolate an irregular points layer (option to
select search radius for an IDW)

Subtract this layer from a DTM layer

Remove zeros from resulting layer

Export to ASCII.



Any ideas or should I not even attempt this with MB?





Simon Jackson
GIS Analyst

Capita Symonds
  Wood Street, East Grinstead. RH19 1UU

Tel: 01342 327161 Direct: 01342 333254
Fax: 01342 315927
Web: www.capitasymonds.co.uk


NCE/ACE Major
Consultant of the Year 2006




**
This email and any files transmitted with it are confidential, and may be
subject to legal privilege, and are intended solely for the use of the
individual or entity to whom they are addressed. 
If you have received this email in error or think you may have done so, you may
not peruse, use, disseminate, distribute or copy this message. Please notify
the sender immediately and delete the original e-mail from your system.

Computer viruses can be transmitted by e-mail. Recipients should check this
e-mail for the presence of viruses. The Capita Group and its subsidiaries
accept no liability for any damage caused by any virus transmitted by this
e-mail.
***






___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic - How to tell if a ButtonPad is Showing

2006-08-02 Thread Peter Horsbøll Møller
Title: RE: [MI-L] MapBasic - How to tell if a ButtonPad is Showing






Hi,


Here is a small function that will toggle the appearance of a named buttonpad. You can use this as inspiration ;-)


- ButtonPadInfo(name_of_buttonpad, BTNPAD_INFO_WINID)

will return the WindowID of the buttonpad

- WindowInfo(nWID, WIN_INFO_OPEN) 

will, when used on a buttonpad, tell you if the buttonpad is shown (=true) or hidden (=false)


'

Sub PADShowHide(ByVal sPadName As String )


Dim nWID As Integer


OnError GoTo ErrorOccured


 nWID = ButtonPadInfo(sPadName, BTNPAD_INFO_WINID)


 If WindowInfo(nWID, WIN_INFO_OPEN) Then

  Alter ButtonPad sPadName Hide

 Else

  Alter ButtonPad sPadName Show

 End If


'---

ErrorOccured:


End Sub 

'



Peter Horsbøll Møller

GIS Developer, MTM

Geographical Information  IT



COWI A/S

Odensevej 95

DK-5260 Odense S.

Denmark



Tel +45 6311 4900

Direct +45 6311 4908

Mob +45 5156 1045

Fax +45 6311 4949

E-mail [EMAIL PROTECTED]

http://www.cowi.dk/gis


For enden af regnbuen... - hvordan kommer man dertil og er det overhovedet muligt? 

Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference


-Original Message-

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Nicki Cozens

Sent: Wednesday, August 02, 2006 10:23 AM

To: mapinfo-l@lists.directionsmag.com

Subject: [MI-L] MapBasic - How to tell if a ButtonPad is Showing


Re the posting on 07-21-2006 and reply by Lars I. Nielsen:


Do you have an example of how WindowInfo is used to find the Show/Hide status of a floating button bar? 


I'm struggling with showing and hiding a button pad. 


I create the button bar and make sure that it has show as one of the attributes. 


I then issue the command buttonpad_id = FrontWindow() to obtain the window id. 


I tried to then issue the Set Window buttonpad_id Hide but it said I couldn't do that to that kind of window, so I tried Close Window buttonpad_id instead and it would appear that when I used the

FrontWindow() command it was picking up the map window instead of the button pad I had just created as the map window closes and not the button pad.

Any suggestions as to what I am doing wrong?


Here is the code:


Create ButtonPad Accept As

 PushButton 

  Icon 185

  HelpMsg Click to accept when happy

  Calling Accept_changes

 PushButton 

  Icon 195

  HelpMsg Click to reject

  Calling reject_changes

 Width 3

  Position (2,2)

  Show 

 Float


buttonpad_id = FrontWindow()


'The following would not work with the window in question 'Set Window buttonpad_id

' Hide

Close Window buttonpad_id'this closed the

map window


Many thanks

Nicki


___

Leicestershire County Council - rated a 'four-star' council by the Audit Commission ___


This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.

Incoming and outgoing e-mail messages are routinely monitored for compliance with Leicestershire County Council's policy on the use of electronic communications. The contents of e-mails may have to be disclosed to a request under the Data Protection Act 1998 and the Freedom of Information Act 2000.

The views expressed by the author may not necessarily reflect the views or policies of the Leicestershire County Council.

Attachments to e-mail messages may contain viruses that may damage your system. Whilst Leicestershire County Council has taken every reasonable precaution to minimise this risk, we cannot accept any liability for any damage which you sustain as a result of these factors. You are advised to carry out your own virus checks before opening any attachment.



___

MapInfo-L mailing list

MapInfo-L@lists.directionsmag.com

http://www.directionsmag.com/mailman/listinfo/mapinfo-l





___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic - How to tell if a ButtonPad is Showing

2006-08-02 Thread Lars I. Nielsen (GisPro)

Hi Nicki,

Certainly :-)

   Dim i As SmallInt
   Dim WID As Integer
   Dim name As String
 
   For i = 1 To NumAllWindows()

   WID = WindowID(-i)
   If WindowInfo(WID,WIN_INFO_TYPE) = WIN_BUTTONPAD Then
   name = WindowInfo(WID,WIN_INFO_NAME)
   If WindowInfo(WID,WIN_INFO_OPEN) Then
   Print BUTTONPAD, name =  + name +  is visible
...

Showing and hiding buttonpads are done using the Alter ButtonPad 
statement, as such (hiding all buttonpads) :


   Dim i As SmallInt
   Dim WID As Integer
   Dim name As String
  
   For i = 1 To NumAllWindows()

   WID = WindowID(-i)
   If WindowInfo(WID,WIN_INFO_TYPE) = WIN_BUTTONPAD Then
   name = WindowInfo(WID,WIN_INFO_NAME)
   If WindowInfo(WID,WIN_INFO_OPEN) Then
   Alter ButtonPad name Hide
...

Buttonpads are not normal windows, and FrontWindow() and Close Window 
can only be used on browsers, mappers, graph and layout windows.


Best regards / Med venlig hilsen
Lars I. Nielsen
GisPro



Nicki Cozens wrote:

Re the posting on 07-21-2006 and reply by Lars I. Nielsen:

Do you have an example of how WindowInfo is used to find the Show/Hide
status of a floating button bar?  

I'm struggling with showing and hiding a button pad.  


I create the button bar and make sure that it has show as one of the
attributes.  


I then issue the command buttonpad_id = FrontWindow() to obtain the
window id.  


I tried to then issue the Set Window buttonpad_id Hide but it said I
couldn't do that to that kind of window, so I tried Close Window
buttonpad_id instead and it would appear that when I used the
FrontWindow() command it was picking up the map window instead of the
button pad I had just created as the map window closes and not the
button pad.

Any suggestions as to what I am doing wrong?

Here is the code:

Create ButtonPad Accept As
	PushButton 
		Icon 185

HelpMsg Click to accept when happy
Calling Accept_changes
	PushButton 
		Icon 195

HelpMsg Click to reject
Calling reject_changes
Width 3
Position (2,2)
   	Show 
	Float


buttonpad_id = FrontWindow()

'The following would not work with the window in question
'Set Window buttonpad_id
'   Hide
Close Window buttonpad_id   'this closed the
map window

Many thanks
Nicki

___
Leicestershire County Council - rated a  'four-star' council by the Audit 
Commission
___


This e-mail and any files transmitted with it are confidential. If you are not 
the intended recipient, any reading, printing, storage, disclosure, copying or 
any other action taken in respect of this e-mail is prohibited and may be 
unlawful. If you are not the intended recipient, please notify the sender 
immediately by using the reply function and then permanently delete what you 
have received.

Incoming and outgoing e-mail messages are routinely monitored for compliance 
with Leicestershire County Council's policy on the use of electronic 
communications.   The contents of e-mails may have to be disclosed to a request 
under the Data Protection Act 1998 and the Freedom of Information Act 2000.

The views expressed by the author may not necessarily reflect the views or 
policies of the Leicestershire County Council.

Attachments to e-mail messages may contain viruses that may damage your system. 
Whilst Leicestershire County Council has taken every reasonable precaution to 
minimise this risk, we cannot accept any liability for any damage which you 
sustain as a result of these factors. You are advised to carry out your own 
virus checks before opening any attachment.



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

  

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Question

2006-08-01 Thread [EMAIL PROTECTED]

Hi Tom,

Try:

delete from tablename [where rowid=n]

You'll need to supply the table name in place of tablename. The 
optional rowid where clause allows you to select a particular record to 
delete.


-- Eric Johnson




Tom Halbrook wrote:


Hi Listers:

Being a MapBasic Neophyte, I have what will probably be a dumb 
question. But here goes any way.


I manually select a record from table A, append it to table B, delete 
the selected record from table A and then save both tables.


To automate steps I have built a button pad and associated program to 
append the selected record to table B, then commit both tables. But I 
can’t seem


to find the right statement to delete the record from table A. I know 
it’s simple but I’m at my wits end.


Any Help?

Thanks, Tom H



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
  



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Spencer Simpson
I’m not going to pretend I understand what’s going on.   However, I’ve found
that aliases act flaky if you refer to them too many times between fetches.

First, try replacing your problematic IF statement with a DO CASE statement
and see if that works.

If not, do what I always do: Retrieve the value of the alias into a
variable, and then work with the variable.

Object aliases are a little more difficult since you can't assign a null
object to a variable, so you have to do something like:

Dim o as object
Dim o_a as alias

o_a  = sometab.obj
...
fetch next from sometab
if (o_a)
   then o=o_a
do case ObjectInfo (o, OBJ_INFO_TYPE)
   case 4, 7 .

etc.

HTH
Spencer






From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nicki Cozens
Sent: Friday, July 28, 2006 9:14 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] MAPBASIC Object or not Object?

Hi
 
I have what I believe is an object in a layer - I think it's a line - if I
query it in the Maspbasic window in MI with select objectinfo (obj,1) from
table_name then look at the selection table I see object type 3 ie a line.
 
If I use the following line in some Mapbasic code which interrogates the
same layer:
 
If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias,
OBJ_INFO_TYPE) = 7 then
 
Then I get the following error when it gets to the object that I believe is
a “line”:
 
(Blah.mb:123)ObjectInfo: argument 2 out of range
 
 
If I write what is happening out to a text file ie 
Print #1, (temptablearray(i) +  + colname+    +colAlias +   +
ObjectInfo(ColAlias, OBJ_INFO_TYPE))  where colAlias is the Alias of the
column name: ColAlias = Temptabname  .  Colname
 
 
I get the following:
 
Query134
Query134  object   Polyline  4
 
The top line above is the “line” that I think is causing the problem, the
second line above shows a result that works.
 
Is this “line” an object or not and can I do anything to avoid the out of
range error?
 
I hope this all makes sense!!
 
Nicki
 
Nicki Cozens 
Data Management Officer 
Highways Development Control
Leicestershire County Council
County Hall
Glenfield
Leicester
LE3 8RA 
Tel: 0116 265 7420 
Fax: 0116 265 7133
 
  
___
Leicestershire County Council - rated a 'four-star' council by the Audit
Commission
___
 
 
This e-mail and any files transmitted with it are confidential. If you are
not the intended recipient, any reading, printing, storage, disclosure,
copying or any other action taken in respect of this e-mail is prohibited
and may be unlawful. If you are not the intended recipient, please notify
the sender immediately by using the reply function and then permanently
delete what you have received.
 
Incoming and outgoing e-mail messages are routinely monitored for compliance
with Leicestershire County Council's policy on the use of electronic
communications. The contents of e-mails may have to be disclosed to a
request under the Data Protection Act 1998 and the Freedom of Information
Act 2000.
 
The views expressed by the author may not necessarily reflect the views or
policies of the Leicestershire County Council.
 
Attachments to e-mail messages may contain viruses that may damage your
system. Whilst Leicestershire County Council has taken every reasonable
precaution to minimise this risk, we cannot accept any liability for any
damage which you sustain as a result of these factors. You are advised to
carry out your own virus checks before opening any attachment.
 
 



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Bill Thoen
Test the value of OBJ_INFO_TYPE just before you evaluate the expression. 
It should equal 1. If you haven't included MapBasic.def, or if you set 
up a variable like obj_info_type, that could cause that error. Also, 
it's better form to use the defined constants OBJ_TYPE_PLINE and 
OBJ_TYPE_REGION instead of 4 or 7; it makes your code easier to understand.


Nicki Cozens wrote:


Hi

I have what I believe is an object in a layer - I think it's a line - 
if I query it in the Maspbasic window in MI with select objectinfo 
(obj,1) from table_name then look at the selection table I see object 
type 3 ie a line.


If I use the following line in some Mapbasic code which interrogates 
the same layer:


If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias, 
OBJ_INFO_TYPE) = 7 then


Then I get the following error when it gets to the object that I 
believe is a “line”:


* (Blah.mb:123)ObjectInfo: argument 2 out of range *

If I write what is happening out to a text file ie

Print #1, (temptablearray(i) + + colname+  +colAlias +  + 
ObjectInfo(ColAlias, OBJ_INFO_TYPE)) where colAlias is the Alias of 
the column name: ColAlias = Temptabname  .  Colname


I get the following:

Query134

Query134 object Polyline 4

The top line above is the “line” that I think is causing the problem, 
the second line above shows a result that works.


Is this “line” an object or not and can I do anything to avoid the out 
of range error?


I hope this all makes sense!!

Nicki

Nicki Cozens
Data Management Officer
Highways Development Control
Leicestershire County Council
County Hall
Glenfield
Leicester
LE3 8RA

Tel: 0116 265 7420
Fax: 0116 265 7133

___

Leicestershire County Council - rated a 'four-star' council by the 
Audit Commission


___

This e-mail and any files transmitted with it are confidential. If you 
are not the intended recipient, any reading, printing, storage, 
disclosure, copying or any other action taken in respect of this 
e-mail is prohibited and may be unlawful. If you are not the intended 
recipient, please notify the sender immediately by using the reply 
function and then permanently delete what you have received.


Incoming and outgoing e-mail messages are routinely monitored for 
compliance with Leicestershire County Council's policy on the use of 
electronic communications. The contents of e-mails may have to be 
disclosed to a request under the Data Protection Act 1998 and the 
Freedom of Information Act 2000.


The views expressed by the author may not necessarily reflect the 
views or policies of the Leicestershire County Council.


Attachments to e-mail messages may contain viruses that may damage 
your system. Whilst Leicestershire County Council has taken every 
reasonable precaution to minimise this risk, we cannot accept any 
liability for any damage which you sustain as a result of these 
factors. You are advised to carry out your own virus checks before 
opening any attachment.




___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
 



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Bill Thoen

Spencer Simpson wrote:


I’m not going to pretend I understand what’s going on.   However, I’ve found
that aliases act flaky if you refer to them too many times between fetches.
 

I don't think they're flakey, you just have to understand how they work. 
Every time you fetch a new record, that updates the alias. If you need a 
variable that doesn't chnage with fetch, then as you say, use a normal 
variable.



Object aliases are a little more difficult since you can't assign a null
object to a variable...
 

Another way to simulate a null object in a variable is to assign it to 
an object that has no dimension (e.g. a line with the start and end 
point in the same place, or pline or region with 0 nodes). Then to test 
null-ness check it's length or area and see if it's zero. I often use 
this technique in functions that return an object when a bad situation 
would otherwise cause a crash.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Spencer Simpson
No, I've found that aliases (especially objects) can act strangely if you
try to extract their values more than once between two successive fetches.
Maybe newer versions of MapInfo are more robust, but it conditioned me to
always fetch aliases into variables back in the 1990s. 

Using degenerate objects to simulate null objects is useful, but it
doesn't help fetching them from a table, because you can't guarantee that a
row didn't have its object deleted. 

It looks as if the original poster actually included mapbasic.def since his
print statement worked.   There may also be some subtle corruption that a
Pack Table would reveal.

HTH
Spencer



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen
Sent: Friday, July 28, 2006 10:27 AM
To: mapinfo-l@lists.directionsmag.com
Subject: Re: [MI-L] MAPBASIC Object or not Object?

Spencer Simpson wrote:

I'm not going to pretend I understand what's going on.   However, I've
found
that aliases act flaky if you refer to them too many times between fetches.
  

I don't think they're flakey, you just have to understand how they work. 
Every time you fetch a new record, that updates the alias. If you need a 
variable that doesn't chnage with fetch, then as you say, use a normal 
variable.

Object aliases are a little more difficult since you can't assign a null
object to a variable...
  

Another way to simulate a null object in a variable is to assign it to 
an object that has no dimension (e.g. a line with the start and end 
point in the same place, or pline or region with 0 nodes). Then to test 
null-ness check it's length or area and see if it's zero. I often use 
this technique in functions that return an object when a bad situation 
would otherwise cause a crash.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Bill Thoen

Spencer Simpson wrote:


No, I've found that aliases (especially objects) can act strangely if you
try to extract their values more than once between two successive fetches.
Maybe newer versions of MapInfo are more robust, but it conditioned me to
always fetch aliases into variables back in the 1990s. 
 

I'd have to say, Prove it. IMHO, that's a superstition that you 
develpoed as you were learning and now it's just a habit. It's similar 
to the superstition that using defined constants is not safe.



Using degenerate objects to simulate null objects is useful, but it
doesn't help fetching them from a table, because you can't guarantee that a
row didn't have its object deleted. 
 

That's right. And for that you can test the object itself (which is 
actually an alias). But once you put an object into a variable you need 
another way to indicate whether its valid or not.


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MAPBASIC Object or not Object?

2006-07-28 Thread Peter Horsbøll Møller
  That's right. And for that you can test the object itself (which is 
  actually an alias). But once you put an object into a variable you need 
  another way to indicate whether its valid or not.

I agree, Bill. It could be very usefull, if there was a function in MapBasic 
that actual could test whether an object was legal or not/exists or was null, 
or what ever you want to call this state.
This is especially usefull when you have a function, that expects to get an 
object and also returns an object. How would you handle this situation ? What 
you make sure that you don't call the function with a not existing object, or 
could in some way handle the problem inside the function in a smart manner 
without corupting the table ?

I tend to check before calling the funtion, but would love to hear about a 
solution to the second if possible.

Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis

For enden af regnbuen... - hvordan kommer man dertil og er det overhovedet 
muligt? 
Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen
Sent: Friday, July 28, 2006 5:39 PM
To: Spencer Simpson
Cc: mapinfo-l@lists.directionsmag.com
Subject: Re: [MI-L] MAPBASIC Object or not Object?

Spencer Simpson wrote:

No, I've found that aliases (especially objects) can act strangely if 
you try to extract their values more than once between two successive fetches.
Maybe newer versions of MapInfo are more robust, but it conditioned me 
to always fetch aliases into variables back in the 1990s.
  

I'd have to say, Prove it. IMHO, that's a superstition that you develpoed as 
you were learning and now it's just a habit. It's similar to the superstition 
that using defined constants is not safe.

Using degenerate objects to simulate null objects is useful, but it 
doesn't help fetching them from a table, because you can't guarantee 
that a row didn't have its object deleted.
  

That's right. And for that you can test the object itself (which is actually an 
alias). But once you put an object into a variable you need another way to 
indicate whether its valid or not.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l




___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


[Spam] RE: [MI-L] Mapbasic Program - Create Thin Arrows

2006-07-24 Thread Juan José Del Toro Madrueño
Title: Mapbasic Program - Create Thin Arrows









Dear Paul;

How do you get a lines
azimuth into a column?



Saludos! / Greetings!Juan Jos Del Toro Madrueo[EMAIL PROTECTED]Guadalajara, Jalisco MXICON 20 40 33.95W 103 26 39.47











De:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] En nombre de Paul Smith
Enviado el: Domingo, 23 de Julio
de 2006 08:30 p.m.
Para: 'Frank Aaron (PL/EUS)'
CC: 'MapInfo List'
Asunto: RE: [MI-L] Mapbasic
Program - Create Thin Arrows





Hi Frank,



You can do this in Mapinfo



1. Create points from your coordinates.
Use a suitable arrow symbol style whichdirectionisnorth.



2.Use the rotate symbols tool to
rotate the symbols based on you column of azimuths.



Cheers



Paul









From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Aaron (PL/EUS)
Sent: Sunday, 23 July 2006 1:26 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] Mapbasic Program -
Create Thin Arrows

Hi,


Does
anyone know of a MapBasic program that can read a column with azimuths
(heading) and create an arrow in the direction of the required heading? BR

Frank Aaron, MSc. Physics, MSEE 
Staff Wireless Systems Engineer, RF Engineering Services

Ericsson USA 
Service  Solutions Operations, NA 
Tel: (972) 583-0112

Fax: (972) 583-2273 
Mobile: (972) 679-9291 
mail to: [EMAIL PROTECTED] 





=[Disclaimer]=
This electronic transmission, including any attachments, is confidential, may
contain privileged information and should be read or retained only by the
intended recipient. If you received this message in error, please delete it
from your system and notify the sender immediately. Any review, dissemination
or other use of this information by persons or entities other than the intended
recipient is strictly prohibited.
=[End]= 








___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic Program - Create Thin Arrows

2006-07-23 Thread Paul Smith
Title: Mapbasic Program - Create Thin Arrows



Hi Frank,

You can do this in Mapinfo

1. Create points from your coordinates. Use a suitable 
arrow symbol style whichdirectionisnorth.

2.Use the rotate symbols tool to rotate the symbols 
based on you column of azimuths.

Cheers

Paul


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Frank 
Aaron (PL/EUS)Sent: Sunday, 23 July 2006 1:26 AMTo: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic Program - 
Create Thin Arrows

Hi, 
Does anyone know of a MapBasic program that can read 
a column with azimuths (heading) and create an arrow in the direction of the 
required heading? BR
Frank Aaron, MSc. Physics, MSEE Staff Wireless Systems Engineer, RF Engineering 
Services Ericsson USA 
Service  Solutions Operations, 
NA Tel: (972) 583-0112 Fax: (972) 583-2273 
Mobile: (972) 679-9291 mail to: [EMAIL PROTECTED] 




===[Disclaimer]===
This electronic transmission, including any attachments, is confidential, may contain privileged information and should be read or retained only by the intended recipient. If you received this message in error, please delete it from your system and notify the sender immediately. Any review, dissemination or other use of this information by persons or entities other than the intended recipient is strictly prohibited.
===[End]===






___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic - How to tell if a ButtonPad is Shown or not?

2006-07-21 Thread Lars I. Nielsen (GisPro)

Hi Bill,

WindowInfo will give you the state of the floating buttonpad window.

A docked toolbar is always visible.

Best regards / Med venlig hilsen
Lars I. Nielsen
GisPro



Bill Thoen wrote:

In ButtonPadInfo() there doesn't seem to be any way to tell if a ButtonPad
is visible. This status is tracked in the Toolbar Options dialog (MI menu
Options  Toobars) but there doesn't seem to to be any to get to it from
MapBasic.

Anyone know where the Show/Hide status of toolbars is kept?


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

  

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic - Expanding Munged filenames on the MapInfo RecentFiles menu

2006-07-14 Thread Uffe Kousgaard

From: Bill Thoen [EMAIL PROTECTED]


Or does MI keep a full copy of the
filename hidden behind the menu and just display the munged version?


That is almost 100% certain.

Regards
Uffe

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic - Expanding Munged filenames on the MapInfoRecentFiles menu

2006-07-14 Thread Peter Horsbøll Møller
Title: Re: [MI-L] MapBasic - Expanding Munged filenames on the MapInfoRecentFiles menu






I see two possible places to 
store that information:

1. The MapInfow.prf where MapInfo normally 
stores the preferences
2. The Registry

Unfortunately I'm at the moment sitting at 
a computer with no MapInfo installed (!!!), so I can't test it



Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information  IT

COWI A/S
Odensevej 95
5260 Odense S.
Denmark

Tel + 456311 4900
Dir+45 6311 4908
Mob+45 5156 1045
Fax + 45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk


From: [EMAIL PROTECTED] 
on behalf of Uffe KousgaardSent: Fri 14-Jul-06 08:45To: 
Mapinfo-LSubject: Re: [MI-L] MapBasic - Expanding Munged filenames on 
the MapInfoRecentFiles menu

From: "Bill Thoen" [EMAIL PROTECTED] Or does 
MI keep a full copy of the filename hidden behind the menu and just 
display the munged version?That is almost 100% 
certain.RegardsUffe___MapInfo-L 
mailing listMapInfo-L@lists.directionsmag.comhttp://www.directionsmag.com/mailman/listinfo/mapinfo-l


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Language Definition and program building

2006-07-09 Thread Uffe Kousgaard
Some Ultraedit / mapbasic resources:

ftp://www.ultraedit.com/wf/mapbasic.txt
http://www.mapinfo-l.com/Wiki/UltraEdit
http://lanstorp.com/

Regards
Uffe

- Original Message - 
From: David Baker [EMAIL PROTECTED]
To: MapInfo-L@lists.directionsmag.com
Sent: Thursday, July 06, 2006 3:00 PM
Subject: Re: [MI-L] MapBasic Language Definition and program building


 On 6 Jul 2006 at 13:37, Mike Tonge [EMAIL PROTECTED] wrote:

  Does anyone have a language definition for mapbasic that could be used
with
  ultraedit to provide syntax highlighting?

 I downloaded a file called mapbasic.txt from somewhere, and the same site
 also included instructions on how to set it up so you can have all the
 subroutines  functions listed on the right side, and hotkeys for compile,
 link  run.

 If nobody has the link I can have a look around for it - I remember it
took
 me quite a while to find it last time.

 Dave

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Language Definition and program building

2006-07-06 Thread Bill Thoen
On Thu, Jul 06, 2006 at 01:37:14PM +0100, Mike Tonge wrote:
   Also does anyone know if makefiles are possible with mapbasic code?


Yes, and they work great. I use GNU Make with UE and the only time I use
the MapBasic editor interactively any more is when I teach a MapBasic
class. You do have to get disciplined about naming your source files,
because even though Windows is not case-sensitive about file names, Make
definitiely is. 
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Language Definition and program building

2006-07-06 Thread David Baker
On 6 Jul 2006 at 13:37, Mike Tonge [EMAIL PROTECTED] wrote:

 Does anyone have a language definition for mapbasic that could be used with 
 ultraedit to provide syntax highlighting?

I downloaded a file called mapbasic.txt from somewhere, and the same site 
also included instructions on how to set it up so you can have all the 
subroutines  functions listed on the right side, and hotkeys for compile, 
link  run.

If nobody has the link I can have a look around for it - I remember it took 
me quite a while to find it last time.

Dave
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE : [MI-L] MapBasic Language Definition and program building

2006-07-06 Thread Robin Prest
Title: Message



Hi,

I sent 
you an answer, but I forgot a link and the copy to the 
list...

http://www.ultraedit.com/index.php?name=Contentpa=showpagepid=40#wordfiles

All 
the syntax files you need...

Robin.



-Message 
d'origine-De: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] De la part de Mike 
TongeEnvoyé: jeudi 6 juillet 2006 14:37À: 
MapInfo-L@lists.directionsmag.comObjet: [MI-L] MapBasic 
Language Definition and program building

  Hi List
  
  Does anyone have a language definition for mapbasic that could be used 
  with ultraedit to provide syntax highlighting?
  
  Also does anyone know if makefiles are possible with mapbasic code?
  
  Mike
  Summer Placement Student
  Atkins
  
  
  All 
  New Yahoo! Mail  Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard protect 
you.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic

2006-06-27 Thread Peter Horsbøll Møller



Matt,

If you have a "newer" version of MapInfo Pro, you can on the installation 
cd find a folder called PDF_DOCS.
In this folder there is a copy of a number of usefull manuals. 

You can here find as well the MapInfo User Guide as well as the MapBasic 
User Guide and MapBasic Reference Guide

HTH,
Peter 
Horsbøll Møller GIS Developer, MTM 
Geographical Information  IT  COWI A/S Odensevej 95 DK-5260 
Odense S. Denmark  Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis 



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew 
DolanSent: Tuesday, June 27, 2006 3:13 PMTo: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] 
MapBasic


Hi all:

I was wondering if there is a site 
or book, etc.. that introduces users to MapBasic functionality and 
commands. I am a heavy user of MapInfo 6.5, but have no programming 
background. I am thinking that using the MB control would open up a whole 
new world to me and take my skills to another 
level.

Two main issues I have 
currently: 1)Labels getting scrambled when I refresh a database. 

 
2)Creating 
transparent polygons.

Thanks and I hope this makes sense 
to the experts out there. 

Matt 
DolanDirector of Market 
Analytics  GISColliers 
Arnold4350 West Cypress St, Suite 
300
Tampa, FL 33607-4175
813.221.2290
813.224.9403 
(Fax)

www.colliersarnold.com
[EMAIL PROTECTED]
Colliers Arnold - Tampa 
/ Clearwater / Orlando / Ft. Myers
Colliers International 
- 241 offices in54 countries on six 
continents


This e-mail and 
attachments (if any) is intended only for the addressee(s) and is subject to 
copyright. This e-mail contains information which may be confidential or 
privileged. If you are not the intended recipient please advise the sender 
by return e-mail, do not use or disclose the contents and delete the message and 
any attachments from your system. Unless specifically stated, this e-mail 
does not constitute formal advice or commitment by the sender or Colliers Arnold 
or any of its subsidiaries.



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] Mapbasic to create DBMS table from Access

2006-06-25 Thread Richard Greenwood

On 6/23/06, Graham Bish [EMAIL PROTECTED] wrote:


Hi fellow MapInfo users

I am trying to build a .WOR File to DBMS a series of tables out of a Ms
Access database.

Below is the MapBasic script that is displayed in the MapBasic window in
MapInfo V8 (but it doesn't work when placed in a workspace)



Below is the code that I use to open a MS SQL Server table. Check the
MB help file for the proper connection string for anMS Access db.


dim con as integer

con=Server_Connect(ODBC, DSN=database;UID=user_name;PWD=password)

server con link table select * from remote_table into local_table


Rich

--
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic - Passing paramaters to Main

2006-06-13 Thread Jakob Lanstorp
You can not pass parameters to the Main procedure. The MapBasic
RemoteMsgHandler can handle DDE input fra a calling app with a
commandinfo(cmd_info_msg).
But the calling app is not mapbasic window. If your in a mb app there
must be another way of getting data from MapInfo than DDE through the
MapBasic window. Especially when the data is coordinates

HTH,
Jakob


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brendan
Tagg
Sent: Tuesday, June 13, 2006 4:37 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] Mapbasic - Passing paramaters to Main


Does anyone know how to pass (of if its possible to) pass paramaters
into /out of a mapbasic program so that it can be called from the
mapbasic window (or a workspace).

For example an app might be

declare function product(x as float ,y float) as float function
product(x as float ,y float) as float
product = x * y
exit function
end function


Thanks in advance
Brendan Tagg
Melbourne, Australia


This email and any attachments may contain privileged and confidential
information and are intended for the named addressee only. If you have
received this e-mail in error, please notify the sender and delete this
e-mail immediately. Any confidentiality, privilege or copyright is not
waived or lost because this e-mail has been sent to you in error. It is
your responsibility to check this e-mail and any attachments for
viruses.  No warranty is made that this material is free from computer
virus or any other defect or error.  Any loss/damage incurred by using
this material is not the sender's responsibility.  The sender's entire
liability will be limited to resupplying the material.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l




___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic Code to ESRI Conversion

2006-06-08 Thread Warren Vick, Europa Technologies Ltd.
Hello Jae,

Actually, I'm not sure you should rely on this query in MapBasic! The
IntersectNodes() function changed after v4.5 of Pro (when they tinkered with
the map object processing). It used to give you a nice polyline representing
the topological relationship between two objects and taking the length of
the result would make sense. However, it was subsequently changed and now
the returned polyline can only be considered a set of points. As such, any
object length you can out of it has no meaning and indeed could be
unpredictable.

If I've understood what you want to do, wouldn't an overlap test be better
(assuming you're working with regions)?

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

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Behrmann,
Jae
Sent: 07 June 2006 23:18
To: MapInfo-L@lists.directionsmag.com
Subject: [MI-L] MapBasic Code to ESRI Conversion


MapInfo and ESRI gurus:
 
I'm trying to convert a MapBasic statement to ESRI:
 
select * from theTable where
ObjectLen(IntersectNodes(theTable.obj,theObj,INCL_COMMON),mi)0.001
'Note theTable is a mappable table and theObj is a variable (graphical
object) 'The statement selects all records in the the mappable table that
are touching theObj variable, but excludes those records that are just
barely touching theObj variable.
 
Please respond if you know how to write this statement within ArcGIS.  Any
assistance would be appreciated.  
Thanks,
Jae Behrmann
 
 
 
 
 
 
 

***
The information in this email is confidential and may be legally privileged
Access to this email by anyone other than the intended addressee is
unauthorized. If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful. If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.

***


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l




___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic C# dll

2006-05-19 Thread Uffe Kousgaard



C# assemblies are something quite different than 
the kind of DLL's that mapbasic understands. Don't get fooled by the extension - 
DLL.

There are 3 main kind of DLL's:

1) 32-bit DLL with exported functions
2) OCX
3) .NET assemblies

MB only understands 1)
VB6 understands 1) and 2), but can only create 
2)
Some older VB could also create 1)
C# / VB.NET understands all 3, but can only create 
3)
Delphi.NET understands all 3, but can 
create1) and 3)
Delphi/win32 understands 1) and 2) and can create 
1) and 2).

Kind regards

Uffe Kousgaardwww.routeware.dk

  - Original Message - 
  From: 
  McGowan Dean 
  To: mapinfo-l@lists.directionsmag.com 
  
  Sent: Friday, May 19, 2006 10:30 AM
  Subject: [MI-L] MapBasic C# dll
  
  
  My MB application compiles 
  correctly but produces error 342 (“External library does not contain GPS_X…”) 
  at runtime. Can anybody point out where I am going wrong?
  
  Dean 
  McGowan
  GIS 
  Injengör
  Teknik  
  Service
  Upplands Väsby 
  kommun
  [EMAIL PROTECTED]
  
  Tel. 08-590 
  97563
  Mobil 073-910 
  4563
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic C# dll

2006-05-19 Thread SCISOFT








Dean



Although youre better off reading a
C or C++ first-principles book, theres a simple project / article on the
CodeProject which gives a recipe for the simplest C-callable DLLs but I think
you will need to get a not-free (but still cheap) version of Visual Studio 2005
so that you can build it using C++ (not C#). I dont think there is an
Express version of C/C++ available. 



The article is called Super Easy DLL
by Greg Ellis written December 2004 for Visual C++ 6.0 - www.codeproject.com/dll/EasyDLL.asp

Of course, the example given in this very
short article is trivial. 

If you go this path, read the comments /
warnings to the article (at the bottom), since this isnt the panacea for
all DLL development. 





But, as has been pointed out several times
here by the experts, Delphi is just super
super easy for C-callable convention DLLs compared with even this article. 

IL Thomas
GeoSciSoft- Perth,
 Australia











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of McGowan Dean
Sent: Friday, May 19, 2006 4:30 PM
To:
mapinfo-l@lists.directionsmag.com
Subject: [MI-L] MapBasic C# dll





I have written a dll in
C# express edition and would like to call its functions from MapBasic. Here are
my scripts:



C#

using
System;

using
System.Collections.Generic;

using
System.Text;

using
System.Data;



namespace
MapInfoTools

{


public class MIFunctions


{


public double GPS_X()


{


//Return test value for now.


return 1;


}


public double GPS_Y()


{


//Return test value for now.


return 2;


}


}

}



MB

Declare
Function GPS_X Lib
C:\Projects\C#\MapInfoTools\MapInfoTools\obj\Release\MapInfoTools.dll
as float

print GPS_X()



My MB application
compiles correctly but produces error 342 (External library does not
contain GPS_X) at runtime. Can anybody point out where I am going
wrong?

Cheers, Dean







Dean McGowan

GIS
Injengör

Teknik
 Service

Upplands
Väsby kommun

[EMAIL PROTECTED]



Tel. 08-590 97563

Mobil 073-910 4563








___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic and MapXtreme

2006-05-11 Thread Peter Horsbøll Møller
Title: MapBasic and MapXtreme



Christine,

No need for apologize on this list. The only stupid question here, are 
those that not has been asked.

In short:
Yes, your intranet application would be written completely in .NET using 
MapXtreme and VB.NET, C# or other .NET languages.
Yes, your VB.NET application could technically access a MapBasic 
application running on MapInfo Pro, but licensing forbids 
this.

The longer version:
You need to distinguise between what is technical possible and what is 
allowed under the software license.
Youcan technical control a MapInfo Pro/MapBasic application thru 
VB.NET or any other .NET language (even "oldfashioned" programming languages 
like VB). This is also allowed by the software license, as long as each user of 
your application has a license for MapInfo Pro.

As soon as you start looking for a web application things get a bit more 
complicated. You can access and control a MapInfo Pro using a web application. I 
have seems some examples of this. But the license for MapInfo Pro doesn't allow 
you doing this. So for web applications, you need to buy a "web license" for 
MapXtreme2005 and use this only.

MapXtreme2005 can also be used for developing desktop applications. If 
so, you need to buy single user seats for each user of you 
application.

I hope this did 
answer your question. If not let me know
Peter Horsbøll Møller GIS Developer, MTM Geographical Information  
IT  COWI A/S Odensevej 
95 DK-5260 Odense S. Denmark  Tel 
+45 6311 4900 Direct +45 6311 4908 
Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] 
http://www.cowi.dk/gis 



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Ronning, 
ChristineSent: Thursday, May 11, 2006 7:03 PMTo: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] MapBasic and 
MapXtreme

Hi all, 
Excuse my ignorance in this, but hoping to understand 
a little bit more about the relationship between MapInfo capability with web 
software (MapXtreme). After a little research I see that you can use .NET 
languages which brings me to my question.
If for example I wanted to created a intranet 
application that allowed employees through a site, to enter a desired 
location with a few options of what they wanted on their map and see an output, 
would this programming be done all with a .NET language or would some of it be 
done using MapBasic? So if I were to write a program in MapBasic that ran 
some spatial queries could this then be called from a VB.Net program that is run 
from the MapXtreme application?
I apologize if this doesn't make sense, but hopefully 
someone understands my question! Thanks 
Christine 
Christine Ronning GIS Analyst, Strategic Information 740 Carmi Avenue Penticton, BC 
V2A 8P9 250-770-3408/250-870-4677 
[EMAIL PROTECTED] 

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-31 Thread Simon Allen
Title: Message



One for you David


From: Bob Young [mailto:[EMAIL PROTECTED] 
Sent: 31 March 2006 12:21To: Simon Allen; David Reid; 
mapinfo-l@lists.directionsmag.comSubject: Re: [MI-L] Mapbasic stops 
when window is no longer active

Hi Simon

My gut feeling is that when you manually do steps 
some optimisation is taking place. Are you doing the steps literally one at a 
time? For example when you drop the three indexes are they all dropped in one 
operation or three separate operations?

What is the time difference? How long is it 
manually and how long through the program?

Put a print timer() between each line and find out 
which line(s) is taking longer. I suspect the statusbar is a red 
herring.

Regards


Bob




  - Original Message - 
  From: 
  Simon Allen 
  To: David Reid ; mapinfo-l@lists.directionsmag.com 
  
  Sent: Thursday, March 30, 2006 6:25 
  PM
  Subject: RE: [MI-L] Mapbasic stops when 
  window is no longer active
  
  David
  
  You imply that at some point during the execution 
  Progress Bars are displaying?
  
  At which point?
  
  ta
  
  
  From: David Reid [mailto:[EMAIL PROTECTED] 
  Sent: 30 March 2006 18:19To: Simon Allen; mapinfo-l@lists.directionsmag.comSubject: 
  RE: [MI-L] Mapbasic stops when window is no longer active
  
  I'm 
  glad this came back up. I was unclear about something in th Mapbasic UG 
  and Ref guide.
  
  Are 
  there certain commands that will cause ProgressBars to automatically be 
  re-enstated without issueing "Set ProgressBars On"?
  
  For 
  instance, if I "Set Progressbars Off", can a "Commit Table" command reset or 
  turn "Set ProgressBars Off" back to "On"?
  
  For 
  example, here's a snippet of an MB I use to refresh a table I regularly 
  "re"geocode, of about 40k records.
  
  In 
  order to try and speed up the process, I've set progressbars off, redraw off 
  and drop the index on any indexed fields:
  
   Set Progressbars Off Set map redraw 
  off drop index MYTABLE (FIELD1) 
  drop indexMYTABLE (FIELD2) drop index MYTABLE 
  (FIELD3) ' The following line deletes the graphic 
  objects in the selection  Delete Object From 
  MYTABLE ' The following line Saves the 
  table Commit Table MYTABLE ' The 
  following line packs both graphics and data of the table 
  Pack Table MYTABLE Graphic Data 'The following lines 
  rebuilds the index of the specified columns Create Index 
  On MYTABLE (FIELD1) Create Index On MYTABLE 
  (FIELD2) Create Index On MYTABLE (FIELD3) Set 
  map redraw On Set Progressbars On
  
  So,is the "Commit" or "Pack table" statementsturning 
  progress bars back on?
  
  Theabove takesfar more time programattically 
  thanmanually and requires me to nurse Mapinfo thewhole time by 
  keeping it in front.
  
  Thanks,
  David Reid
  
  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Simon 
  AllenSent: Thursday, March 30, 2006 10:17 AMTo: 
  mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
  when window is no longer active
  
  Hi Joe
  
  Submitted a similar request myself recently . You need to 
  disable Progress Bars: with "Set ProgressBars Off".
  
  Ta
  
  
  From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Joe 
  NunnSent: 30 March 2006 16:30To: 
  mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops 
  when window is no longer active
  
  
  Dear 
  All,
  
  I am sure this has been asked 
  before but here goes I have program that runs fine, but when I start using 
  another program (ie move the active window) mapinfo appears to halt. When I 
  make the mapinfo window active again it continues to process files. Any 
  ideas how to make it run while using another 
  application?
  
  Joe 
  Nunn
  
  The XYZ 
  Digital Map Company
  Unit 9 
  Phase 2 Hardengreen Business Park
  Dalhousie 
  Road
  Dalkeith, 
  EH22 
  3NX
  Scotland
  
  Tel: +44 
  131 454 0426
  Fax: +44 
  131 454 0443
  E-mail: 
  [EMAIL PROTECTED]
  
  Web: 
  www.xyzmaps.com
  **
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

  --Checked by AVG Free Edition.Version: 7.1.385 / 
  Virus Database: 268.3.3/298 - Release Date: 03/30/2006
  
  --Outgoing mail is certified Virus FreeChecked by AVG 
  Free Edition.Version: 7.1.385 / Virus Database: 268.3.3/298 - Release 
  Date: 03/30/2006**

RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-30 Thread Simon Allen




Hi Joe

Submitted a similar request myself recently . You need to 
disable Progress Bars: with "Set ProgressBars Off".

Ta


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Joe 
NunnSent: 30 March 2006 16:30To: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops when 
window is no longer active


Dear 
All,

I am sure this has been asked before 
but here goes I have program that runs fine, but when I start using another 
program (ie move the active window) mapinfo appears to halt. When I make the 
mapinfo window active again it continues to process files. Any ideas how 
to make it run while using another application?

Joe 
Nunn

The XYZ 
Digital Map Company
Unit 9 Phase 
2 Hardengreen Business Park
Dalhousie 
Road
Dalkeith, 
EH22 
3NX
Scotland

Tel: +44 131 
454 0426
Fax: +44 131 
454 0443
E-mail: 
[EMAIL PROTECTED]

Web: 
www.xyzmaps.com

**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-30 Thread David Reid
Title: Message



I'm 
glad this came back up. I was unclear about something in th Mapbasic UG 
and Ref guide.

Are 
there certain commands that will cause ProgressBars to automatically be 
re-enstated without issueing "Set ProgressBars On"?

For 
instance, if I "Set Progressbars Off", can a "Commit Table" command reset or 
turn "Set ProgressBars Off" back to "On"?

For 
example, here's a snippet of an MB I use to refresh a table I regularly 
"re"geocode, of about 40k records.

In 
order to try and speed up the process, I've set progressbars off, redraw off and 
drop the index on any indexed fields:

 
Set Progressbars Off Set map redraw off drop 
index MYTABLE (FIELD1) drop indexMYTABLE 
(FIELD2) drop index MYTABLE (FIELD3) 
' The following line deletes the graphic objects in the selection 
 Delete Object From MYTABLE ' The 
following line Saves the table Commit Table 
MYTABLE ' The following line packs both graphics and data 
of the table Pack Table MYTABLE Graphic 
Data 'The following lines rebuilds the index of the 
specified columns Create Index On MYTABLE 
(FIELD1) Create Index On MYTABLE 
(FIELD2) Create Index On MYTABLE (FIELD3) Set 
map redraw On Set Progressbars On

So,is the "Commit" or "Pack table" statementsturning progress 
bars back on?

Theabove takesfar more time programattically 
thanmanually and requires me to nurse Mapinfo thewhole time by 
keeping it in front.

Thanks,
David 
Reid


-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Simon 
AllenSent: Thursday, March 30, 2006 10:17 AMTo: 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

Hi Joe

Submitted a similar request myself recently . You need to 
disable Progress Bars: with "Set ProgressBars Off".

Ta


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Joe 
NunnSent: 30 March 2006 16:30To: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops when 
window is no longer active


Dear 
All,

I am sure this has been asked before 
but here goes… I have program that runs fine, but when I start using another 
program (ie move the active window) mapinfo appears to halt. When I make the 
mapinfo window active again it continues to process files. Any ideas how 
to make it run while using another application?

Joe 
Nunn

The XYZ 
Digital Map Company
Unit 9 Phase 
2 Hardengreen Business Park
Dalhousie 
Road
Dalkeith, 
EH22 
3NX
Scotland

Tel: +44 131 
454 0426
Fax: +44 131 
454 0443
E-mail: 
[EMAIL PROTECTED]

Web: 
www.xyzmaps.com
**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

--Checked by AVG Free Edition.Version: 7.1.385 / 
Virus Database: 268.3.3/298 - Release Date: 03/30/2006



--
Outgoing mail is certified Virus Free
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/298 - Release Date: 03/30/2006
 
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-30 Thread Simon Allen
Title: Message



David

You imply that at some point during the execution Progress 
Bars are displaying?

At which point?

ta


From: David Reid [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2006 18:19To: Simon Allen; 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

I'm 
glad this came back up. I was unclear about something in th Mapbasic UG 
and Ref guide.

Are 
there certain commands that will cause ProgressBars to automatically be 
re-enstated without issueing "Set ProgressBars On"?

For 
instance, if I "Set Progressbars Off", can a "Commit Table" command reset or 
turn "Set ProgressBars Off" back to "On"?

For 
example, here's a snippet of an MB I use to refresh a table I regularly 
"re"geocode, of about 40k records.

In 
order to try and speed up the process, I've set progressbars off, redraw off and 
drop the index on any indexed fields:

 
Set Progressbars Off Set map redraw off drop 
index MYTABLE (FIELD1) drop indexMYTABLE 
(FIELD2) drop index MYTABLE (FIELD3) 
' The following line deletes the graphic objects in the selection 
 Delete Object From MYTABLE ' The 
following line Saves the table Commit Table 
MYTABLE ' The following line packs both graphics and data 
of the table Pack Table MYTABLE Graphic 
Data 'The following lines rebuilds the index of the 
specified columns Create Index On MYTABLE 
(FIELD1) Create Index On MYTABLE 
(FIELD2) Create Index On MYTABLE (FIELD3) Set 
map redraw On Set Progressbars On

So,is the "Commit" or "Pack table" statementsturning progress 
bars back on?

Theabove takesfar more time programattically 
thanmanually and requires me to nurse Mapinfo thewhole time by 
keeping it in front.

Thanks,
David 
Reid


-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Simon 
AllenSent: Thursday, March 30, 2006 10:17 AMTo: 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

Hi Joe

Submitted a similar request myself recently . You need to 
disable Progress Bars: with "Set ProgressBars Off".

Ta


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Joe 
NunnSent: 30 March 2006 16:30To: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops when 
window is no longer active


Dear 
All,

I am sure this has been asked before 
but here goes I have program that runs fine, but when I start using another 
program (ie move the active window) mapinfo appears to halt. When I make the 
mapinfo window active again it continues to process files. Any ideas how 
to make it run while using another application?

Joe 
Nunn

The XYZ 
Digital Map Company
Unit 9 Phase 
2 Hardengreen Business Park
Dalhousie 
Road
Dalkeith, 
EH22 
3NX
Scotland

Tel: +44 131 
454 0426
Fax: +44 131 
454 0443
E-mail: 
[EMAIL PROTECTED]

Web: 
www.xyzmaps.com
**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

--Checked by AVG Free Edition.Version: 7.1.385 / 
Virus Database: 268.3.3/298 - Release Date: 03/30/2006

--Outgoing mail is certified Virus FreeChecked by AVG 
Free Edition.Version: 7.1.385 / Virus Database: 268.3.3/298 - Release Date: 
03/30/2006
**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-30 Thread Simon Allen
Title: Message



David

Not sure about this.

However, some observations:


  
  Unless you're seeing the Progress Bars then they're not being reset, I 
  guess.
  
  Although similar your manual process may not be identical to your 
  script.
  
  A true comparison would be between two scripts identical apart from one 
  with ProgressBars On and the other Off (obviously need to exclude time to 
  re-provide focus to MI. I use a separate PC for running scripts to minimise 
  this.
Ta





From: David Reid 
[mailto:[EMAIL PROTECTED] Sent: 30 March 2006 18:33To: 
Simon Allen; mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] 
Mapbasic stops when window is no longer active

No! sorry not to be clear on this. The progress bars aren't 
displaying, however, this process (as shown in my code) takes longer than if I 
did the same tasks manually.

Furthermore, if I bring another program window into focus over MI, the 
process in my example either stops (as indicated in the first part of this 
thread) or slows down even more.

Dave


-Original Message-From: Simon Allen 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 30, 2006 
11:26 AMTo: David Reid; 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active
David

You imply that at some point during the execution Progress 
Bars are displaying?

At which point?

ta


From: David Reid [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2006 18:19To: Simon Allen; 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

I'm 
glad this came back up. I was unclear about something in th Mapbasic UG 
and Ref guide.

Are 
there certain commands that will cause ProgressBars to automatically be 
re-enstated without issueing "Set ProgressBars On"?

For 
instance, if I "Set Progressbars Off", can a "Commit Table" command reset or 
turn "Set ProgressBars Off" back to "On"?

For 
example, here's a snippet of an MB I use to refresh a table I regularly 
"re"geocode, of about 40k records.

In 
order to try and speed up the process, I've set progressbars off, redraw off and 
drop the index on any indexed fields:

 
Set Progressbars Off Set map redraw off drop 
index MYTABLE (FIELD1) drop indexMYTABLE 
(FIELD2) drop index MYTABLE (FIELD3) 
' The following line deletes the graphic objects in the selection 
 Delete Object From MYTABLE ' The 
following line Saves the table Commit Table 
MYTABLE ' The following line packs both graphics and data 
of the table Pack Table MYTABLE Graphic 
Data 'The following lines rebuilds the index of the 
specified columns Create Index On MYTABLE 
(FIELD1) Create Index On MYTABLE 
(FIELD2) Create Index On MYTABLE (FIELD3) Set 
map redraw On Set Progressbars On

So,is the "Commit" or "Pack table" statementsturning progress 
bars back on?

Theabove takesfar more time programattically 
thanmanually and requires me to nurse Mapinfo thewhole time by 
keeping it in front.

Thanks,
David 
Reid


-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Simon 
AllenSent: Thursday, March 30, 2006 10:17 AMTo: 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

Hi Joe

Submitted a similar request myself recently . You need to 
disable Progress Bars: with "Set ProgressBars Off".

Ta


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Joe 
NunnSent: 30 March 2006 16:30To: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops when 
window is no longer active


Dear 
All,

I am sure this has been asked before 
but here goes I have program that runs fine, but when I start using another 
program (ie move the active window) mapinfo appears to halt. When I make the 
mapinfo window active again it continues to process files. Any ideas how 
to make it run while using another application?

Joe 
Nunn

The XYZ 
Digital Map Company
Unit 9 Phase 
2 Hardengreen Business Park
Dalhousie 
Road
Dalkeith, 
EH22 
3NX
Scotland

Tel: +44 131 
454 0426
Fax: +44 131 
454 0443
E-mail: 
[EMAIL PROTECTED]

Web: 
www.xyzmaps.com
**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

--Checked by AVG Free Edition.Version: 7.1.385 / 
Virus Database: 268.3.3/298 - Release Date: 03/30/2006

--Outgoing mail is certified Virus FreeChecked by AV

RE: [MI-L] Mapbasic stops when window is no longer active

2006-03-30 Thread David Reid
Title: Message



No! sorry not to be clear on this. The progress bars aren't 
displaying, however, this process (as shown in my code) takes longer than if I 
did the same tasks manually.

Furthermore, if I bring another program window into focus over MI, the 
process in my example either stops (as indicated in the first part of this 
thread) or slows down even more.

Dave


-Original Message-From: Simon Allen 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 30, 2006 
11:26 AMTo: David Reid; 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active
David

You imply that at some point during the execution Progress 
Bars are displaying?

At which point?

ta


From: David Reid [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2006 18:19To: Simon Allen; 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

I'm 
glad this came back up. I was unclear about something in th Mapbasic UG 
and Ref guide.

Are 
there certain commands that will cause ProgressBars to automatically be 
re-enstated without issueing "Set ProgressBars On"?

For 
instance, if I "Set Progressbars Off", can a "Commit Table" command reset or 
turn "Set ProgressBars Off" back to "On"?

For 
example, here's a snippet of an MB I use to refresh a table I regularly 
"re"geocode, of about 40k records.

In 
order to try and speed up the process, I've set progressbars off, redraw off and 
drop the index on any indexed fields:

 
Set Progressbars Off Set map redraw off drop 
index MYTABLE (FIELD1) drop indexMYTABLE 
(FIELD2) drop index MYTABLE (FIELD3) 
' The following line deletes the graphic objects in the selection 
 Delete Object From MYTABLE ' The 
following line Saves the table Commit Table 
MYTABLE ' The following line packs both graphics and data 
of the table Pack Table MYTABLE Graphic 
Data 'The following lines rebuilds the index of the 
specified columns Create Index On MYTABLE 
(FIELD1) Create Index On MYTABLE 
(FIELD2) Create Index On MYTABLE (FIELD3) Set 
map redraw On Set Progressbars On

So,is the "Commit" or "Pack table" statementsturning progress 
bars back on?

Theabove takesfar more time programattically 
thanmanually and requires me to nurse Mapinfo thewhole time by 
keeping it in front.

Thanks,
David 
Reid


-Original Message-From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Simon 
AllenSent: Thursday, March 30, 2006 10:17 AMTo: 
mapinfo-l@lists.directionsmag.comSubject: RE: [MI-L] Mapbasic stops 
when window is no longer active

Hi Joe

Submitted a similar request myself recently . You need to 
disable Progress Bars: with "Set ProgressBars Off".

Ta


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Joe 
NunnSent: 30 March 2006 16:30To: 
mapinfo-l@lists.directionsmag.comSubject: [MI-L] Mapbasic stops when 
window is no longer active


Dear 
All,

I am sure this has been asked before 
but here goes… I have program that runs fine, but when I start using another 
program (ie move the active window) mapinfo appears to halt. When I make the 
mapinfo window active again it continues to process files. Any ideas how 
to make it run while using another application?

Joe 
Nunn

The XYZ 
Digital Map Company
Unit 9 Phase 
2 Hardengreen Business Park
Dalhousie 
Road
Dalkeith, 
EH22 
3NX
Scotland

Tel: +44 131 
454 0426
Fax: +44 131 
454 0443
E-mail: 
[EMAIL PROTECTED]

Web: 
www.xyzmaps.com
**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

--Checked by AVG Free Edition.Version: 7.1.385 / 
Virus Database: 268.3.3/298 - Release Date: 03/30/2006

--Outgoing mail is certified Virus FreeChecked by AVG 
Free Edition.Version: 7.1.385 / Virus Database: 268.3.3/298 - Release Date: 
03/30/2006**
This email and any files transmitted with it from South
Gloucestershire Council 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 South Gloucestershire Council 
Postmaster at the address below.

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

[EMAIL PROTECTED]
**

--Checked by AVG Free Edition.Version: 7.1.385 / 
Vir

Re: [MI-L] MapBasic 'Call' statement at runtime

2006-03-21 Thread Lars V. Nielsen \(Hvenegaard\)
Hi Thomas,

I'm a little curious why you think you need to implement a dynamically
defined call to a statically defined sub in your code. You can't define the
sub/function in runtime anyway, so why the need to call it this way ?

The usual way is to implement such calls is to utilize a switch/case
statement like this:

Do Case iCmdNmbr
Case 1
Call MySub1 (...)
Case 2
Call MySub2 ()
Case 3
retval = MyFunc3 (...)
Case Else
Note Undefined sub, number =  + iCmdNmbr
End Case

Best regards / Med venlig hilsen
Lars V. Nielsen

Hvenegaard A/S
Rugaardsvej 55, DK-5000 Odense C
Denmark
Tel. +45 6313 5050
http://www.hvenegaard.dk

- Original Message - 
From: Thomas Jund [EMAIL PROTECTED]
To: mapinfo-l@lists.directionsmag.com
Sent: Tuesday, March 21, 2006 9:54 AM
Subject: [MI-L] MapBasic 'Call' statement at runtime



Hi there

I am confronted with a problem regarding the MapBasic 'Call' statement.

The restriction section of the documentation says:
  'You cannot issue a Call statement through the MapBasic window.'

I need to make a call from MapInfo to a own defined Sub or Function with
parameters.
The call to the Sub or Function is composed in runtime ..  I do not have a
static call  like
'Call mySub('My String')' in a Sub.

I found a (ugly) solution with defining a Sub as Menu (this is just
possible without parameters).
Afterwards it is possible to call that sub through the menu ID and reading
the 'parameters' from a
text file.

I would be grateful for suggestions how to solve that problem in a clean
way, probably someone
found already a workaround.


Cheers

Thomas Jund

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic 'Call' statement at runtime

2006-03-21 Thread Lars V. Nielsen \(Hvenegaard\)
Hi Thomas,

You can't call a normal sub / function in an mbx from outside the mbx.

I'll suggest instead using

goMIPro.MBApplications(your.mbx).Do XYZ

to call

Sub RemoteMsgHandler

in your.mbx, and use a switch/case statement I mentioned there, using
CommandInfo(CMD_INFO_MSG) to retrieve the supplied parameter (XYZ).

If you have multiple arguments, either encode them it the single Do
parameter, e.g. 12;345;ABC;True, or use several Global variables in
your.mbx and poke values to them using statements like these

goMIPro.MBApplications(your.mbx).MBGlobals(MyString).Value =
abcdefg
goMIPro.MBApplications(your.mbx).MBGlobals(MyInteger).Value = 12345

before calling Do / RemoteMsgHandler

As for functions, you may take a look at using Eval / RemoteQueryHandler
likewise.

HTH

Best regards / Med venlig hilsen
Lars V. Nielsen

Hvenegaard A/S
http://www.hvenegaard.dk
- Original Message - 
From: Thomas Jund [EMAIL PROTECTED]
To: Lars V. Nielsen (Hvenegaard) [EMAIL PROTECTED]
Sent: Tuesday, March 21, 2006 3:40 PM
Subject: Re: [MI-L] MapBasic 'Call' statement at runtime



Hi Lars

I don't want to define sub/functions in runtime, to be a more precise what
I actually want:

I want to write a module in MapBasic, which supports an application with a
number of sub/functions.
The application communicates with MapInfo as COM object. Now I want  to
load the module on the
COM object with the command 'Run Application myModule.MBX'. Afterwards I
want to call the sub/functions
from the module with parameters through the COM object.

I hope that explains a bit more precisively what I want.


Best regards

Thomas



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Bitwise Operators

2006-03-08 Thread Bill Thoen
On Thu, Mar 09, 2006 at 12:06:26PM +1300, Ian Tidy wrote:
 I am wanting to use bitwise operators in MapBasic, but I can't find any 
 information on them.
 
 Does anyone know if the exist and how to use them, or do I need to write my 
 own functions?

You have to write your own, but it's pretty easy. For example, to test the
5th bit from the right in an integer use integer divide and mod like so:

n = 5
if nBitflags \ 2^(n-1) mod 2 then
  ' bit is set

- Bill Thoen

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MapBasic Bitwise Operators

2006-03-08 Thread Trey Pattillo
MB does not do true bit operations
I have a dll with a whole lot of delphi functions built in it
you can get it here http://www.wap3.com/download/ultramsg.zip

does string math like s=(5+2)*3 and gets back the answer
does HTLM output  better than that dumb message window
and a lot more

On Wednesday 08 March 2006 17:06, Ian Tidy wrote:
 Hi All,

 I am wanting to use bitwise operators in MapBasic, but I can't find any
 information on them.

 Does anyone know if the exist and how to use them, or do I need to write my
 own functions?

 Cheers Ian

 Ian Tidy
 GIS Administrator
 Works Asset Department
 Napier City Council
 Hastings St, Private Bag 6010, Napier, New Zealand
 Phone +64-6-835-7579 Ext. 8115
 Fax +64-6-835-7574
 mailto:[EMAIL PROTECTED]
 http://www.napier.govt.nz http://www.napier.govt.nz/




 ##
 Attention:
 This e-mail message and accompanying data may contain information that
 is confidential and subject to legal privilege. Any information
 provided is given in good faith. However unless specifically stated to
 the contrary, Napier City Council accepts no liability for the
 content of this e-mail or for the consequences of any action taken on
 the basis of the information provided, unless that information is
 subsequently confirmed in writing. If you are not the intended recipient,
 you are notified that any use, dissemination, distribution or copying
 of this message or data is prohibited. If you received this e-mail
 message in error, please notify us immediately and erase all copies
 of this message and attachments. Thank you.

-- 
Trey Pattillo

Failure is not an option
It comes standard with all Microsoft products.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic API Call for XML

2006-02-02 Thread Jakob Lanstorp
Lars Nielsen has a small MapBasic util called XMLlib at
http://www.ni-fam.dk/get2net/download/#english. It works but I have no
experience in it. For a major MapBasic project I had I was not ready for
a util with no source code so I wrote Delphi wrap of Microsofts
msxml.dll, but it is not public available (yet). The problem with XML
and MapBasic is that parsers and XML is very object oriented in it
approach. So you need to swallow a few camels to get it to work.
Basically what I did was parsing xpath expressions to a dll returning
the xpathed XML element value as a string. 

It you push Lars he might free his source code for XMLLib.



Jakob Lanstorp
Software Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S
Denmark
 
Tel +45 6311 4900
Mob +45 4020 7529
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Tidy
Sent: Wednesday, February 01, 2006 2:32 AM
To: MapInfo-L
Cc: [EMAIL PROTECTED]
Subject: [MI-L] MapBasic API Call for XML

Hi All,

I am looking for a Windows DLL that I can call for reading and writing
XML for MapBasic.

Cheers Ian

Ian Tidy
GIS Administrator
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand Phone +64-6-835-7579
Ext. 8115 Fax +64-6-835-7574 mailto:[EMAIL PROTECTED]
http://www.napier.govt.nz http://www.napier.govt.nz/ 
 
 


##
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information provided
is given in good faith. However unless specifically stated to the
contrary, Napier City Council accepts no liability for the content of
this e-mail or for the consequences of any action taken on the basis of
the information provided, unless that information is subsequently
confirmed in writing. If you are not the intended recipient, you are
notified that any use, dissemination, distribution or copying of this
message or data is prohibited. If you received this e-mail message in
error, please notify us immediately and erase all copies of this message
and attachments. Thank you.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

 


Med venlig hilsen

Jakob Lanstorp
Software Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S
Denmark
 
Tel +45 6311 4900
Mob +45 4020 7529
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Tidy
Sent: Wednesday, February 01, 2006 2:32 AM
To: MapInfo-L
Cc: [EMAIL PROTECTED]
Subject: [MI-L] MapBasic API Call for XML

Hi All,

I am looking for a Windows DLL that I can call for reading and writing
XML for MapBasic.

Cheers Ian

Ian Tidy
GIS Administrator
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand Phone +64-6-835-7579
Ext. 8115 Fax +64-6-835-7574 mailto:[EMAIL PROTECTED]
http://www.napier.govt.nz http://www.napier.govt.nz/ 
 
 


##
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information provided
is given in good faith. However unless specifically stated to the
contrary, Napier City Council accepts no liability for the content of
this e-mail or for the consequences of any action taken on the basis of
the information provided, unless that information is subsequently
confirmed in writing. If you are not the intended recipient, you are
notified that any use, dissemination, distribution or copying of this
message or data is prohibited. If you received this e-mail message in
error, please notify us immediately and erase all copies of this message
and attachments. Thank you.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic API Call for XML

2006-02-01 Thread SCISOFT
Well, if you can get MB to interact with .NET then I would use .NET because
it makes read/write of XML like falling off a log (v1.1 or v2.0 are both
very capable).
XML is many things though - schema is all-important. 

IL Thomas
GeoSciSoft - Perth, Australia

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:mapinfo-l-
 [EMAIL PROTECTED] On Behalf Of Ian Tidy
 Sent: Wednesday, February 01, 2006 9:32 AM
 To: MapInfo-L
 Cc: [EMAIL PROTECTED]
 Subject: [MI-L] MapBasic API Call for XML
 
 Hi All,
 
 I am looking for a Windows DLL that I can call for reading and writing XML
 for MapBasic.
 
 Cheers Ian
 
 Ian Tidy
 GIS Administrator
 Works Asset Department
 Napier City Council
 Hastings St, Private Bag 6010, Napier, New Zealand
 Phone +64-6-835-7579 Ext. 8115
 Fax +64-6-835-7574
 mailto:[EMAIL PROTECTED]
 http://www.napier.govt.nz http://www.napier.govt.nz/
 
 
 
 
 ##
 Attention:
 This e-mail message and accompanying data may contain information that
 is confidential and subject to legal privilege. Any information
 provided is given in good faith. However unless specifically stated to
 the contrary, Napier City Council accepts no liability for the
 content of this e-mail or for the consequences of any action taken on
 the basis of the information provided, unless that information is
 subsequently confirmed in writing. If you are not the intended recipient,
 you are notified that any use, dissemination, distribution or copying
 of this message or data is prohibited. If you received this e-mail
 message in error, please notify us immediately and erase all copies
 of this message and attachments. Thank you.
 ___
 MapInfo-L mailing list
 MapInfo-L@lists.directionsmag.com
 http://www.directionsmag.com/mailman/listinfo/mapinfo-l
 
 
 --
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.375 / Virus Database: 267.14.25/246 - Release Date:
 30/01/2006

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] MAPBASIC: AlterObject

2006-01-09 Thread Bill Thoen

Tomasz Oberski wrote:

How to change symbology of serveral mapinfo objects? The MapBasic 
AlterObject command lets to modify pen and brush of current (selected) 
object. How can I use that command to change pen and brush of several 
objects at once?Maybe there is another method of changing object's 
symbology?


You have to loop through the collection and change them one at a time. 
The collection can either be ones you've selected manually or they can 
be in a table or an SQL selection.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MAPBASIC: AlterObject

2006-01-09 Thread Peter Horsbøll Møller
Spencer,

I think the problem with your function is that the parameters are send ByRref 
not ByVal. This shoul dbe the correct structure:

Function AlterPen (ByVal o as object, ByVal p as pen) as object 

Alter object o Info OBJ_INFO_PEN, p

End Function

Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Simpson
Sent: Monday, January 09, 2006 11:23 PM
To: 'Bill Thoen'
Cc: mapinfo-l@lists.directionsmag.com
Subject: RE: [MI-L] MAPBASIC: AlterObject

There was once the suggestion that you could write a function that returned an 
object and use SQL Update to update all of the objects.  So if you had the 
function

Function AlterPen (o as object, p as pen) as object Alter object o Info 
OBJ_INFO_PEN, p End function

You could then alter the pens of each of the objects in a table with

Update mytab set obj=AlterPen (obj, p)

I seem to recall trying this several years ago, and that it worked once, but I 
could never get it to work again.

Hope this helps
Spencer

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen
Sent: Monday, January 09, 2006 4:03 PM
To: Tomasz Oberski
Cc: mapinfo-l@lists.directionsmag.com
Subject: Re: [MI-L] MAPBASIC: AlterObject

Tomasz Oberski wrote:

 How to change symbology of serveral mapinfo objects? The MapBasic 
 AlterObject command lets to modify pen and brush of current (selected) 
 object. How can I use that command to change pen and brush of several 
 objects at once?Maybe there is another method of changing object's 
 symbology?

You have to loop through the collection and change them one at a time. 
The collection can either be ones you've selected manually or they can be in 
a table or an SQL selection.
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic Label Clause - Problems using variables as Positionand Offset

2005-12-28 Thread Peter Horsbøll Møller
Mike,

I would recommend that you built your Set Map command using a command string:

   sCommand = Set Map Window   MAP1
   Layer   S_OPEN_NAME 
  Display Graphic
  Label 
  Line None 
  Position  
 S_OFFSET_DIR 

S_LAB_FONT 
  Pen (1,2,0)
  With   
S_LABEL
  Parallel On 
auto off Overlap Off Duplicates Off
  Offset   
I_OFFSET_DIS 
  Visibility 
On
Run Command sCommand
 
HTH,

Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Jenne
Sent: Wednesday, December 28, 2005 10:09 PM
To: MapInfo-L@lists.directionsmag.com
Subject: [MI-L] MapBasic Label Clause - Problems using variables as Positionand 
Offset


Afternoon (here in the States, anyway) all!

 

I've run into a slight problem writing MapBasic code.  In Set Map, I'm trying 
to use variables for the Position and Offset portions of the Label clause.  A 
sample of this code is below.  The intent of this piece of code is to extract 
values (pertaining to labeling) from a reference table, which are then stored 
into variables.  Everything had worked just fine until I attempted to 
incorporate variables for label offset values, specifically direction (Left, 
Right, Center, Above, Below) and offset.  For whatever reason, the MapBasic 
compiler gives me an error statement, specifically Missing = in assignment 
to S_OFFSET_DIR.  The line it's calling an error on is Layer S_OPEN_NAME 
Display Graphic  Label Line None Position S_OFFSET_DIR..  If I substitute a 
normal value (like left) for S_OFFSET_DIR, then the error statement is 
Missing = in assignment to I_OFFSET_DIS instead.

 

BTW, S_OFFSET_DIR is declared as a string variable, and I_OFFSER_DIS is an 
integer.  Also, all of the other variables in the label clause (such as 
S_LABEL, S_LABEL_FONT.) had worked just fine.

 

Anyone have a guess as to what the problem might be?

 

Hope all is well with you all, and that everyone has a great New Year.

 

Mike Jenne

JCSI

Trussville, Alabama, USA

 

  If FileExists(S_PATH_1) then  

  Open Table S_PATH_1 as S_OPEN_NAME

  LAYER_CTR = LAYER_CTR+1 S_LABEL1 = ACTIVE_LAYER.LABEL 
S_LABEL=S_LABEL1 

 

  I_FONTCL2 = ACTIVE_LAYER.FONT_CL2

  I_FONTCL3 = ACTIVE_LAYER.FONT_CL3

  I_FONTCL4 = ACTIVE_LAYER.FONT_CL4

  I_FONTCL5 = ACTIVE_LAYER.FONT_CL5

  S_LABEL1 = ACTIVE_LAYER.TYPE

  S_OFFSET_DIR =ACTIVE_LAYER.OFFSET_DIR

  I_OFFSET_DIS = ACTIVE_LAYER.OFFSET_DIS

 

 
S_LAB_FONT=MakeFont(Arial,I_FONTCL2,I_FONTCL3,I_FONTCL4,I_FONTCL5)



 Add Map Window MAP1 Auto Layer S_OPEN_NAME 

 Set Map Window MAP1

 Layer S_OPEN_NAME Display Graphic  Label Line None Position 
S_OFFSET_DIR Font S_LAB_FONT Pen (1,2,0) 

  With S_LABEL  Parallel On auto off Overlap Off Duplicates Off 
Offset I_OFFSET_DIS Visibility On

 

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com 
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic Label Clause - Problems using variables as Positionand Offset

2005-12-28 Thread Mike Jenne
Peter,

I tried your solution, and it worked well.  

 

Mange tak!

 

Mike Jenne

 

-Original Message-
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 28, 2005 3:29 PM
To: Mike Jenne; MapInfo-L@lists.directionsmag.com
Subject: RE: [MI-L] MapBasic Label Clause - Problems using variables as
Positionand Offset

 

Mike, 

I would recommend that you built your Set Map command using a command
string: 

   sCommand = Set Map Window   MAP1 
   Layer   S_OPEN_NAME 
  Display Graphic

  Label  
  Line
None 
  Position
  S_OFFSET_DIR 
   
S_LAB_FONT 
  Pen
(1,2,0) 
  With  
S_LABEL 
  Parallel
On auto off Overlap Off Duplicates Off 
  Offset 
 I_OFFSET_DIS 
 
Visibility On 
Run Command sCommand 
  
HTH, 

Peter Horsbøll Møller 
GIS Developer, MTM 
Geographical Information  IT 
  
COWI A/S 
Odensevej 95 
DK-5260 Odense S. 
Denmark 
  
Tel +45 6311 4900 
Direct  +45 6311 4908 
Mob +45 5156 1045 
Fax +45 6311 4949 
E-mail  [EMAIL PROTECTED] 
 http://www.cowi.dk/gis http://www.cowi.dk/gis 

 

-Original Message- 
From: [EMAIL PROTECTED] [
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] On Behalf Of Mike Jenne

Sent: Wednesday, December 28, 2005 10:09 PM 
To: MapInfo-L@lists.directionsmag.com 
Subject: [MI-L] MapBasic Label Clause - Problems using variables as
Positionand Offset 

 

Afternoon (here in the States, anyway) all! 

  

I've run into a slight problem writing MapBasic code.  In Set Map, I'm
trying to use variables for the Position and Offset portions of the Label
clause.  A sample of this code is below.  The intent of this piece of code
is to extract values (pertaining to labeling) from a reference table, which
are then stored into variables.  Everything had worked just fine until I
attempted to incorporate variables for label offset values, specifically
direction (Left, Right, Center, Above, Below) and offset.  For whatever
reason, the MapBasic compiler gives me an error statement, specifically
Missing = in assignment to S_OFFSET_DIR.  The line it's calling an error
on is Layer S_OPEN_NAME Display Graphic  Label Line None Position
S_OFFSET_DIR..  If I substitute a normal value (like left) for
S_OFFSET_DIR, then the error statement is Missing = in assignment to
I_OFFSET_DIS instead.

  

BTW, S_OFFSET_DIR is declared as a string variable, and I_OFFSER_DIS is an
integer.  Also, all of the other variables in the label clause (such as
S_LABEL, S_LABEL_FONT.) had worked just fine.

  

Anyone have a guess as to what the problem might be? 

  

Hope all is well with you all, and that everyone has a great New Year. 

  

Mike Jenne 

JCSI 

Trussville, Alabama, USA 

  

  If FileExists(S_PATH_1) then  

  Open Table S_PATH_1 as S_OPEN_NAME 

  LAYER_CTR = LAYER_CTR+1 S_LABEL1 = ACTIVE_LAYER.LABEL
S_LABEL=S_LABEL1 

  

  I_FONTCL2 = ACTIVE_LAYER.FONT_CL2 

  I_FONTCL3 = ACTIVE_LAYER.FONT_CL3 

  I_FONTCL4 = ACTIVE_LAYER.FONT_CL4 

  I_FONTCL5 = ACTIVE_LAYER.FONT_CL5 

  S_LABEL1 = ACTIVE_LAYER.TYPE 

  S_OFFSET_DIR =ACTIVE_LAYER.OFFSET_DIR 

  I_OFFSET_DIS = ACTIVE_LAYER.OFFSET_DIS 

  

  
S_LAB_FONT=MakeFont(Arial,I_FONTCL2,I_FONTCL3,I_FONTCL4,I_FONTCL5) 



 Add Map Window MAP1 Auto Layer S_OPEN_NAME 

 Set Map Window MAP1 

 Layer S_OPEN_NAME Display Graphic  Label Line None Position
S_OFFSET_DIR Font S_LAB_FONT Pen (1,2,0) 

  With S_LABEL  Parallel On auto off Overlap Off Duplicates
Off Offset I_OFFSET_DIS Visibility On 

  

___ 
MapInfo-L mailing list 
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
http://www.directionsmag.com/mailman/listinfo/mapinfo-l 

 

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] MapBasic Label Clause - Problems using variables as Positionand Offset

2005-12-28 Thread Peter Horsbøll Møller
Mange tak, seems as more people than expected can speak Danish ;-)
 
You are most welcome,

Peter Horsbøll Møller 
GIS Developer, MTM 
Geographical Information  IT 
  
COWI A/S 
Odensevej 95 
DK-5260 Odense S. 
Denmark 
  
Tel +45 6311 4900 
Direct  +45 6311 4908 
Mob +45 5156 1045 
Fax +45 6311 4949 
E-mail   mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
http://www.cowi.dk/gis 

-Original Message-
From: Mike Jenne [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 28, 2005 11:19 PM
To: Peter Horsbøll Møller
Cc: MapInfo-L@lists.directionsmag.com
Subject: RE: [MI-L] MapBasic Label Clause - Problems using variables as 
Positionand Offset



Peter,

I tried your solution, and it worked well.  

 

Mange tak!

 

Mike Jenne

 

-Original Message-
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 28, 2005 3:29 PM
To: Mike Jenne; MapInfo-L@lists.directionsmag.com
Subject: RE: [MI-L] MapBasic Label Clause - Problems using variables as 
Positionand Offset

 

Mike, 

I would recommend that you built your Set Map command using a command string: 

   sCommand = Set Map Window   MAP1 
   Layer   S_OPEN_NAME 
  Display Graphic 
  Label  
  Line None 
  Position  
 S_OFFSET_DIR 

S_LAB_FONT 
  Pen 
(1,2,0) 
  With   
S_LABEL 
  Parallel On 
auto off Overlap Off Duplicates Off 
  Offset   
I_OFFSET_DIS 
  Visibility 
On 
Run Command sCommand 
  
HTH, 

Peter Horsbøll Møller 
GIS Developer, MTM 
Geographical Information  IT 
  
COWI A/S 
Odensevej 95 
DK-5260 Odense S. 
Denmark 
  
Tel +45 6311 4900 
Direct  +45 6311 4908 
Mob +45 5156 1045 
Fax +45 6311 4949 
E-mail  [EMAIL PROTECTED] 
 http://www.cowi.dk/gis http://www.cowi.dk/gis 

 

-Original Message- 
From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
On Behalf Of Mike Jenne

Sent: Wednesday, December 28, 2005 10:09 PM 
To: MapInfo-L@lists.directionsmag.com 
Subject: [MI-L] MapBasic Label Clause - Problems using variables as Positionand 
Offset 

 

Afternoon (here in the States, anyway) all! 

  

I've run into a slight problem writing MapBasic code.  In Set Map, I'm trying 
to use variables for the Position and Offset portions of the Label clause.  A 
sample of this code is below.  The intent of this piece of code is to extract 
values (pertaining to labeling) from a reference table, which are then stored 
into variables.  Everything had worked just fine until I attempted to 
incorporate variables for label offset values, specifically direction (Left, 
Right, Center, Above, Below) and offset.  For whatever reason, the MapBasic 
compiler gives me an error statement, specifically Missing = in assignment 
to S_OFFSET_DIR.  The line it's calling an error on is Layer S_OPEN_NAME 
Display Graphic  Label Line None Position S_OFFSET_DIR..  If I substitute a 
normal value (like left) for S_OFFSET_DIR, then the error statement is 
Missing = in assignment to I_OFFSET_DIS instead.

  

BTW, S_OFFSET_DIR is declared as a string variable, and I_OFFSER_DIS is an 
integer.  Also, all of the other variables in the label clause (such as 
S_LABEL, S_LABEL_FONT.) had worked just fine.

  

Anyone have a guess as to what the problem might be? 

  

Hope all is well with you all, and that everyone has a great New Year. 

  

Mike Jenne 

JCSI 

Trussville, Alabama, USA 

  

  If FileExists(S_PATH_1) then  

  Open Table S_PATH_1 as S_OPEN_NAME 

  LAYER_CTR = LAYER_CTR+1 S_LABEL1 = ACTIVE_LAYER.LABEL 
S_LABEL=S_LABEL1 

  

  I_FONTCL2 = ACTIVE_LAYER.FONT_CL2 

  I_FONTCL3 = ACTIVE_LAYER.FONT_CL3 

  I_FONTCL4 = ACTIVE_LAYER.FONT_CL4 

  I_FONTCL5 = ACTIVE_LAYER.FONT_CL5 

  S_LABEL1 = ACTIVE_LAYER.TYPE 

  S_OFFSET_DIR =ACTIVE_LAYER.OFFSET_DIR 

  I_OFFSET_DIS = ACTIVE_LAYER.OFFSET_DIS 

  


S_LAB_FONT=MakeFont(Arial,I_FONTCL2,I_FONTCL3,I_FONTCL4,I_FONTCL5) 



 Add Map Window MAP1 Auto Layer S_OPEN_NAME 

 Set Map Window MAP1 

 Layer S_OPEN_NAME Display Graphic  Label Line None Position 
S_OFFSET_DIR Font S_LAB_FONT Pen (1,2,0) 

  With S_LABEL  Parallel On auto off Overlap Off Duplicates Off 
Offset I_OFFSET_DIS Visibility

RE: MI-L MapBasic opening Excel

2005-10-27 Thread Jorge Gil
Hi Mike,

I personally use of the windows shell32 function FindExecutable which
returns the path to the program associated with a file type. The
function is not restricted to Excel files, it opens any file type with
any associated program. I also use it for PDF and other file types.

Here's the code:
The first function calls the windows API, the second is a custom
MapBasic function to interface with it.

Declare Function FindExecutable Lib shell32.dll Alias
FindExecutableA
(ByVal lpFile As String, ByVal lpDirectory As String, lpResult
As String *256) As Integer
Declare Function FindAndExecute (ByVal file_path As String, ByVal
file_name As String) As Logical

Function FindAndExecute (ByVal file_path As String, Byval file_name As
String) As Logical
Dim file_operation As Integer
Dim executable_path As String *256

file_operation = FindExecutable(file_name, file_path,
executable_path)
If file_operation  32 Then
executable_path = LTrim$(RTrim$(executable_path))
Run Program executable_path +   + file_path +
file_name
FindAndExecute = True
Else
Note Unable to find a program associated with that file
type.
FindAndExecute = False
End If
End Function 


Regards,
Jorge

___
 
Jorge Gil
Simulation Developer
 
SPACE SYNTAX
 
D  +44  (0) 20 7940 1881

[EMAIL PROTECTED]
www.spacesyntax.com

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2005 19:20
To: MapInfo-L@lists.directionsmag.com
Subject: MI-L MapBasic opening Excel

Hello all,
I have a MapBasic app writing out a comma delimited file, then
launching Excel, where a macro opens and formats the data.
 
Here is the mb code:
sReportXLS = myreport.xls
sRunline = C:\Program Files\Microsoft Office\Office11\Excel /e   +
chr$(34)  + sReportXLS  + chr$(34)
Run Program  sRunline
 
My, question: is it possible to obtain the machine's Excel.exe path,
rather than having it hardwired?  I want to be able to handle unexpected
Excel setups.
 
Thanks,
 
Mike



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



RE: MI-L MapBasic opening Excel

2005-10-27 Thread Jacques Paris
Jorge,

I like your solution but for it to work properly, it needs a small
correction in the run program command that should read

Run Program executable_path +   + chr$(34)+ file_path +
file_name +chr$(34)

I do not know if a path containing spaces caused the trouble but with the
quotation marks it works in all circumstances.


Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com



-Original Message-
From: Jorge Gil [mailto:[EMAIL PROTECTED]
Sent: October 27, 2005 10:42
To: [EMAIL PROTECTED]; MapInfo-L@lists.directionsmag.com
Subject: RE: MI-L MapBasic opening Excel

Hi Mike,

I personally use of the windows shell32 function FindExecutable which
returns the path to the program associated with a file type. The
function is not restricted to Excel files, it opens any file type with
any associated program. I also use it for PDF and other file types.

Here's the code:
The first function calls the windows API, the second is a custom
MapBasic function to interface with it.

Declare Function FindExecutable Lib shell32.dll Alias
FindExecutableA
(ByVal lpFile As String, ByVal lpDirectory As String, lpResult
As String *256) As Integer
Declare Function FindAndExecute (ByVal file_path As String, ByVal
file_name As String) As Logical

Function FindAndExecute (ByVal file_path As String, Byval file_name As
String) As Logical
Dim file_operation As Integer
Dim executable_path As String *256

file_operation = FindExecutable(file_name, file_path,
executable_path)
If file_operation  32 Then
executable_path = LTrim$(RTrim$(executable_path))
Run Program executable_path +   + file_path +
file_name
FindAndExecute = True
Else
Note Unable to find a program associated with that file
type.
FindAndExecute = False
End If
End Function


Regards,
Jorge

___

Jorge Gil
Simulation Developer

SPACE SYNTAX

D  +44  (0) 20 7940 1881

[EMAIL PROTECTED]
www.spacesyntax.com

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 25 October 2005 19:20
To: MapInfo-L@lists.directionsmag.com
Subject: MI-L MapBasic opening Excel

Hello all,
I have a MapBasic app writing out a comma delimited file, then
launching Excel, where a macro opens and formats the data.

Here is the mb code:
sReportXLS = myreport.xls
sRunline = C:\Program Files\Microsoft Office\Office11\Excel /e   +
chr$(34)  + sReportXLS  + chr$(34)
Run Program  sRunline

My, question: is it possible to obtain the machine's Excel.exe path,
rather than having it hardwired?  I want to be able to handle unexpected
Excel setups.

Thanks,

Mike



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




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



Re: MI-L MapBasic: fileopendlg$() and filesaveasdlg$()

2005-10-27 Thread Lars V. Nielsen (GisPro)

Hi Jacques,

No choice + OK makes no sense, so they shouldn't be able to return given 
that input.


A legal choice + OK or Cancel should be - and is - the only valid 
responses from the standard file dialogs.


I've used both dialog routines in handlers subs without any problems, 
e.g. in a handler for a button titled ... (prompt for a path name).


What are you trying to accomplish ?

Best regards / Med venlig hilsen
Lars Nielsen
GisPro



Jacques Paris wrote:


I am certainly a very late bloomer in the way I am trying finally to do
certain standard things and discovering some problems.

I am using version MB6.5 to build a dialog box with lots of controls most of
them having their own handlers. One would be a button launching the
procedure to record the user choice for the table to be treated with lots of
checks, the other symmetrical for saving the output.

I just discovered that in the context of handlers (what does appear to me to
be a mere sub) fileopendlg$() and filesaveasdlg$() cannot close when they
should return an empty string (no choice + OK). An empty string can be
detected with the traditional approach of file_name=file...dlg$()  + if
file_name= then  In a handler situation, it is only when cancel is
used that the return value would be analyzed.

I have used the file... functions in many normal subs without encountering
this behavior. Can anyone shed any light on that problem (confirmation,
corrections to it since 6.5, workarounds ...) ?

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com




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


 



Re: MI-L MapBasic: control radiogroup out off contol

2005-10-27 Thread Lars V. Nielsen (GisPro)

Hi Jacques,

How are you disabling the radiogroups ?

It sounds like a problem with a duplicated ID for some groups, or maybe 
the handler name ?


Although possible to some extent, radiogroup controls are not very happy 
about having none of its radio buttons selected, as this is a dubious 
state for this control to be in. Thus it may render some problems by itself.


Best regards / Med venlig hilsen
Lars Nielsen
GisPro



Jacques Paris wrote:


You may have discarded my first message because you did have the slightest
idea of the problem or knowledge of the context (MapBasic6.5). Here is
another one that let me flabbergasted.

It is in the same context of building a dialog box with plenty of
radiogroups. Each one should be disabled (except for the first one) and
with no pre-selection (value 0 for all). Here are some strange things I
noticed:

1 - the value of 1 was assigned to some

2 - a message normally sent via its handler when activating a certainly
control would appear before the dialog is displayed

3 - some controls would be enabled.

I have found a way to avoid these problems: reordering the order of the
control commands within the dialog definition lines of code. But if that
allowed me to move on, it left me with a very sour taste because I have no
idea of the why and thus I am unable to prevent it from happening again.

Does anyone have any idea of what is happening there? Has it been corrected
since version 6.5?

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com




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


 



Re: MI-L MapBasic opening Excel

2005-10-27 Thread MikeKilmore
Ian, Peter, Ian, r, Jorge, and Jacque,
Thanks all for the great outpourings of help.
 
I will try them out and let the list know how it went.
 
Gratefully,
 
Mike


Re: MI-L MapBasic opening Excel

2005-10-26 Thread Ian Hull
Mike,

Try the following, which doesn't rely on knowing which version of Excel 
you are using and will work for most programs. Just supply the executable 
name to the function e.g. excel.exe or msaccess.exe

'

Define HKEY_LOCAL_MACHINE -2147483646
Define  REG_SZ 1
Define  ERROR_SUCCESS  0
 
Declare Function RegCloseKey Lib advapi32.dll (ByVal hKey As Integer) As 
Integer
Declare Function RegOpenKey Lib advapi32.dll Alias RegOpenKeyA (ByVal 
hKey As Integer, ByVal lpSubKey As String, phkResult As Integer) As 
Integer
Declare Function RegQueryValueEx Lib advapi32.dll Alias 
RegQueryValueExA (ByVal hKey As Integer, ByVal lpValueName As String, 
ByVal lpReserved As Integer, lpType As Integer, lpData As string, lpcbData 
As Integer) As Integer
declare function GetExePath (Byval ExeName as string) as string
'
'
' 
function GetExePath (Byval ExeName as string) as string

Dim lRetVal As integer
Dim hKey,sType,Ssize As integer
Dim sValue,SKey As String

GetExePath=c:\program files\
sType =REG_SZ
Ssize =1024

SKey=Software\Microsoft\Windows\CurrentVersion\App Paths\  ExeName 
lRetVal = RegOpenKey(HKEY_LOCAL_MACHINE,SKey,hKey)

If lRetVal  ERROR_SUCCESS Then
exit function
Else
sValue =string$(ssize,chr$(32))

lRetVal = RegQueryValueEx(hKey,Path, 0, sType , sValue, Ssize )
If lRetVal  ERROR_SUCCESS Then
exit function
Else
GetExePath =rtrim$(sValue)
if right$(rtrim$(sValue),1)\ then
GetExePath=rtrim$(sValue)  \
end if
End If
lRetVal = RegCloseKey(hKey)
End If

'

Regards,

Ian Hull


Greater Manchester Transportation Unit
Salisbury House
Granby Row
Manchester
M1 7AH

Internal Tel: 815 2059
Tel:  0161 455 2059
Fax:  0161 455 2071
E-mail:   [EMAIL PROTECTED]
Website:  http://www.agma.gov.uk/Units/TransportUnit.htm





[EMAIL PROTECTED]
25/10/2005 19:19

 
To: MapInfo-L@lists.directionsmag.com
cc: 
Subject:MI-L MapBasic opening Excel


Hello all,
I have a MapBasic app writing out a comma delimited file, then  launching
Excel, where a macro opens and formats the data.

Here is the mb code:
sReportXLS = myreport.xls
sRunline = C:\Program Files\Microsoft Office\Office11\Excel /e   +
chr$(34)  + sReportXLS  + chr$(34)
Run Program  sRunline

My, question: is it possible to obtain the machine's Excel.exe path, 
rather
than having it hardwired?  I want to be able to handle unexpected Excel
setups.

Thanks,

Mike



**

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.

Please contact [EMAIL PROTECTED] with any queries.

**



Re: MI-L MapBasic opening Excel

2005-10-25 Thread Ian Erickson

You could try to read the registry settings:

Look in 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\Excel\InstallRoot\Path


This is just a quick snippet that might help.  I make no warranties

'
Type FILETIME_t
   dwLowDateTime As Integer
   dwHighDateTime As Integer
End Type

Define HKEY_CLASSES_ROOTH8000
Define HKEY_CURRENT_CONFIGH8005
Define HKEY_CURRENT_USERH8001
Define HKEY_LOCAL_MACHINEH8002
Define HKEY_USERSH8003

Define REG_SZ1
Define REG_DWORD4
Define PS_SIZE 256

Define ERROR_SUCCESS0
Define ERROR_FILE_NOT_FOUND2' Registry path 
does not exist   
Define ERROR_ACCESS_DENIED5' Requested 
permissions not available
Define ERROR_INVALID_HANDLE6' Invalid handle or 
top-level key
Define ERROR_BAD_NETPATH53' Network path not 
found
Define ERROR_INVALID_PARAMETER87' Bad parameter to a 
Win32 API function
Define ERROR_CALL_NOT_IMPLEMENTED120' Function valid only 
in WinNT/2000?XP   
Define ERROR_INSUFFICIENT_BUFFER122' Buffer too 
small to hold data
Define ERROR_BAD_PATHNAME161' Registry path 
does not exist
Define ERROR_NO_MORE_ITEMS259' Invalid 
enumerated value   
Define ERROR_BADDB1009' Corrupted 
registry   
Define ERROR_BADKEY1010' Invalid 
registry key
Define ERROR_CANTOPEN1011' Cannot open 
registry key   
Define ERROR_CANTREAD1012' Cannot read from 
registry key
Define ERROR_CANTWRITE1013' Cannot write to 
registry key   
Define ERROR_REGISTRY_RECOVERED1014' Recovery of part 
of registry successful

Define ERROR_REGISTRY_CORRUPT1015' Corrupted registry
Define ERROR_REGISTRY_IO_FAILED1016' Input/output 
operation failed
Define ERROR_NOT_REGISTRY_FILE1017' Input file not in 
registry file format

Define ERROR_KEY_DELETED1018' Key already deleted
Define ERROR_KEY_HAS_CHILDREN1020' Key has subkeys 
 cannot be deleted


Define KEY_READH20019
Define KEY_SET_VALUEH2

Declare Function RegCloseKey Lib ADVAPI32.DLL (ByVal hKey As Integer) 
As Integer
Declare Function RegOpenKeyEx Lib ADVAPI32.DLL Alias RegOpenKeyExA 
(ByVal hKey As Integer, ByVal SubKey As String, ByVal Reserved as 
Integer, ByVal Options as Integer, pResult As Integer) As Integer
Declare Function RegEnumKeyEx Lib ADVAPI32.DLL Alias RegEnumKeyExA 
(ByVal hKey As Integer, ByVal dwIndex As Integer, lpName As String, 
lpcbName As Integer, ByVal lpReserved As Integer, ByVal lpClass As 
String, lpcbClass As Integer, lpftLastWriteTime As FILETIME_t) As Integer
Declare Function RegSetValueEx Lib ADVAPI32.DLL Alias RegSetValueExA 
(ByVal hKey As Integer, ByVal ValueName As String, ByVal Res1 As 
Integer, ByVal EntryType As Integer, ByVal EntryVal As String, ByVal 
lpcbData As Integer) As Integer
Declare Function RegSetNumberEx Lib ADVAPI32.DLL Alias 
RegSetValueExA (ByVal hKey As Integer, ByVal ValueName As String, 
ByVal Res1 As Integer, ByVal EntryType As Integer, EntryVal As Integer, 
ByVal lpcbData As Integer) As Integer
Declare Function RegQueryInfoKey Lib ADVAPI32.DLL Alias 
RegQueryInfoKeyA (ByVal hKey As Integer, ByVal lpClass As String, 
lpcbClass As Integer, ByVal lpRes As Integer, lpcSubKeys As Integer, 
lpcMaxSubKeyLen As Integer, lpcMaxClassLen As Integer, lpcValues As 
Integer, lpcMaxValueNameLen As Integer, lpcMaxValueLen As Integer, 
lpcbSecurityDescriptor As Integer, lpftLastWriteTime As FILETIME_t) As 
Integer
Declare Function RegQueryValueEx Lib ADVAPI32.DLL Alias 
RegQueryValueExA (ByVal hKey As Integer, ByVal ValueName As String, 
ByVal Res1 As Integer, EntryType As Integer, EntryVal As String*PS_SIZE, 
lpcbData As Integer) As Integer
Declare Function RegQueryNumberEx Lib ADVAPI32.DLL Alias 
RegQueryValueExA (ByVal hKey As Integer, ByVal ValueName As String, 
ByVal Res1 As Integer, EntryType As Integer, NumVal As Integer, lpcbData 
As Integer) As Integer
Declare Function RegQueryValueType Lib ADVAPI32.DLL Alias 
RegQueryValueExA (ByVal hKey As Integer, ByVal ValueName As String, 
ByVal Res1 As Integer, EntryType As Integer, ByVal EntryVal As Integer, 
lpcbData As Integer) As Integer



Function GetExcelPath()

   Dim sPath As String
   Dim iReturn As Integer
   Dim hRegKey As Integer

   iReturn = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
SOFTWARE\Microsoft\Office\9.0\Excel\InstallRoot, 0, KEY_READ, hRegKey)

   

Re: MI-L Mapbasic App version number

2005-10-21 Thread Ahmet Dabanli
create a file and name it verion.txt for example
in the file
put the size of   your   .mb   file
and version number

when the application runs
open this file and read this two info
compare with .mb file size ( if the file exists , if not do not change
anything)
if not same size
increment the Version and write to version.txt

it is not that much good idea but it may help

Regards..



- Original Message -
From: José Huiza [EMAIL PROTECTED]
To: mapinfo-l mapinfo-l@lists.directionsmag.com
Sent: Friday, October 21, 2005 4:16 AM
Subject: MI-L Mapbasic App version number


 Hi, my friends

 I have another question for all of you, is it possible to add to my mb app
a version control?
 like in others apps (especially microsoft) e.g. in the windows About add
a something like  Line.mbx Ver 1.01 and when every time I make a new
improvment to my mb app it would be for example ver 1.02.
 Yes, I know I can do it manually, but is it a way to do it automatically?




 José Huiza Ríos
 511- 99431634
 Lima - Peru








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



Re: MI-L MAPBASIC : How to delete a single row in a multi rows table ?

2005-10-18 Thread Uffe Kousgaard

From: E. BONTE [EMAIL PROTECTED]


I wan't to delete - under mapbasic - a query (one or more rows) 
resulting from a SQL select in a table.


Like this:

Select * from mytable where .. into query1
delete from query1

Kind regards

Uffe Kousgaard
www.routeware.dk


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



RE: MI-L MAPBASIC : How to delete a single row in a multi rows table ?

2005-10-18 Thread Jakob Lanstorp
Delete From MyQuery

will delete both the query and the query relation to the base table,

or delete by row id:

Delete From MyQuery Where Rowid = ARowID

HTH,

Jakob Lanstorp
Software Consultant
Geographical Information  IT 

COWI A/S
Odensevej 95
DK-5260 Odense S

Tel  +45 6311 4900
Fax  +45 6311 4949
Mob  +45 5050 8087
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
http://www.cowi.com


-Original Message-
From: E. BONTE [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 18, 2005 6:20 PM
To: [EMAIL PROTECTED]
Subject: MI-L MAPBASIC : How to delete a single row in a multi rows table ?


I wan't to delete - under mapbasic - a query (one or more rows) 
resulting from a SQL select in a table.
How to do it ?

Thanks,

-- 
Éric BONTE 





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




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



RE: MI-L MapBasic - returning the names of current layers into a popup menu

2005-10-05 Thread Jakob Lanstorp
Hi,

Stolen and modified from Peters repository :)


Include MapBasic.DEF

Declare Sub Main
Declare Function GetTableName(ByVal DlgTitle as string) as string


Sub Main
Print GetTableName(Select table)
end sub

Function GetTableName(ByVal DlgTitle as string) as string
Dim nTab, i, chosen as smallint
Dim arrTab(0) as string

nTab = NumTables()
ReDim arrTab(nTab)

for i = 1 to nTab
arrTab(i) = TableInfo(i,TAB_INFO_NAME )
next

Dialog
Title DlgTitle
Control PopupMenu
Width 200
Title From Variable arrTab
Into chosen
Control OKButton
Control CancelButton

If Not CommandInfo(CMD_INFO_DLG_OK) Then
GetTableName = 
Exit Function
End If

If arrTab(chosen) = Selection Then
GetTableName = SelectionInfo(SEL_INFO_SELNAME)  'use
permanent name
Else
GetTableName = arrTab(chosen)
End If

End Function

HTH,

Jakob Lanstorp
Software Consultant
Geographical Information  IT

COWI A/S
Odensevej 95
5260 Odense S.

Tel +45 6311 4900
Fax +45 6311 4949
Mob +45 5050 8087
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
http://www.cowi.com


-Original Message-
From: Carolyn Bergin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 05, 2005 5:21 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic - returning the names of current layers into a
popup menu


Hi list

Im sure this is a simple one but being relatively new, Im trying to
populate a popup menu with a list of currently open tables for the user
to select from.  

Ive been searching the help all morning but it seem to be escaping me.

Any hints

TIA

Carolyn 


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



RE: MI-L MapBasic - returning the names of current layers into a popup menu

2005-10-05 Thread OSullivan. Jerry \(IT Solutions\)
Carolyn,

The following steps should help you
1. Get the Number of Tables using the NumTables function
2. Create an array of that size
3. Loop on the TableInfo function to get the name for each Layer into
the array
4. Build the dialog using the array

The code below should do it for you

Include MapBasic.Def
Declare sub main

sub main

Dim i as integer
Dim j as integer

Dim TableNames(1) as string
i = NumTables()
ReDim TableNames(i)

For j = 1 to i
TableNames(j) = Tableinfo(j,TAB_INFO_NAME)
Next

Dialog  
  Title Num Tables 
  Control StaticText 
Title Tables: 
Control PopupMenu  
Title  From Variable TableNames
  
  Control OKButton
  Control CancelButton

end sub

Kind Regards 
Jerry O'Sullivan

Jerry O'Sullivan
GIS Consultant
ESBI Computing Ltd
Stephen Court | 18-21 St. Stephen's Green | Dublin 2 
Tel +353 1 7038060 | Fax +353 1 6618455 
E-mail: [EMAIL PROTECTED]
www.esbic.ie


-Original Message-
From: Carolyn Bergin [mailto:[EMAIL PROTECTED] 
Sent: 05 October 2005 04:21
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic - returning the names of current layers into a
popup menu


Hi list

Im sure this is a simple one but being relatively new, Im trying to
populate a popup menu with a list of currently open tables for the user
to select from.  

Ive been searching the help all morning but it seem to be escaping me.

Any hints

TIA

Carolyn 

-Original Message-
From: Bill Thoen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 5 October 2005 8:45 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L SUM: Problem Breaking Up Large Files

Problem: 
How do you break up a file bigger than 2 GB into smaller pieces so that
you can load it into software like Access or MapInfo? Writing a program
in VBA or MapBasic won't work because these programs can't work with
files larger than 2GB. In fact, you can't even open a file bigger than
2GB with these tools. I also couldn't do with gcc (but my version wasn't
compiled for BIG files.)

Solution:
I used Perl on my Linux box and it worked great. Score one for Open
Source! Here's the code: (modified from code sent by Michael Taylor)

open(IN,WhopperFile.txt);
open(OUT1,part1.txt);
open(OUT2,part1.txt);
while (IN) {
  $i++;
  if ($i100) {# This is the line number cutoff
print OUT1 $_;
  } else {
print OUT2 $_;
  }
}
close IN;
close OUT1;
close OUT2;


Other Solutions:
1. Use an editor like TextPad or UltraEdit. This works but it's not
fast. 2. Half the people who responded mentioned SRC's PinPointCRM. You
can download a trial version from
ftp://ftp.extendthereach.com/GET/PinPointCRM/

Thanks, everyone!
- Bill Thoen



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


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



* ** *** ** * ** *** ** * ** *** ** * 
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. 
Any views or opinions presented are solely those of the author, and do not 
necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *


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



RE: MI-L MapBasic - returning the names of current layers into a popup menu

2005-10-05 Thread Spencer Simpson
Easier to type the code than to explain.   There are of course a lot of
possible variations, depending upon what you want to achieve.

Hope this helps
Spencer


Function TableList (a (0) as string, ByVal pad as smallint) as smallint

Dim nt as smallint
Dim tt as string
Dim tn as smallint
'Dim t (0) as string

Nt = NumTables()
Redim a (nt+pad)
For i = 1 to nt
a (i) = TableINfo (i, TAB_INFO_NAME)
Next
TableList=nt
End function

'
' Now, when you get to your dialog:
'

Dim dlg_t (0) s string
Dim dlg_nt as smallint

Function PickTable () as string

Dim i as smallint

Dlg_nt = TableList (dlg_t, 0)
If dlg_nt = 0
   then PickTable=
exit function
End if

Dialog title Pick a table
   control PopupMenu title from variable dlg_t
   into i
   control OKButton
   control CancelButton

If CommandInfo (CMD_INFO_DLG_OK)
   then PickTable = dlg_t (i)
   else PickTable = 
End if
End function


-Original Message-
From: Carolyn Bergin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 04, 2005 11:21 PM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic - returning the names of current layers into a popup
menu

Hi list

Im sure this is a simple one but being relatively new, Im trying to populate
a popup menu with a list of currently open tables for the user to select
from.  

Ive been searching the help all morning but it seem to be escaping me.

Any hints

TIA

Carolyn 

-Original Message-
From: Bill Thoen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 5 October 2005 8:45 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L SUM: Problem Breaking Up Large Files

Problem: 
How do you break up a file bigger than 2 GB into smaller pieces so that you
can load it into software like Access or MapInfo? Writing a program in VBA
or MapBasic won't work because these programs can't work with files larger
than 2GB. In fact, you can't even open a file bigger than 2GB with these
tools. I also couldn't do with gcc (but my version wasn't compiled for BIG
files.)

Solution:
I used Perl on my Linux box and it worked great. Score one for Open Source!
Here's the code: (modified from code sent by Michael Taylor)

open(IN,WhopperFile.txt);
open(OUT1,part1.txt);
open(OUT2,part1.txt);
while (IN) {
  $i++;
  if ($i100) {# This is the line number cutoff
print OUT1 $_;
  } else {
print OUT2 $_;
  }
}
close IN;
close OUT1;
close OUT2;


Other Solutions:
1. Use an editor like TextPad or UltraEdit. This works but it's not fast.
2. Half the people who responded mentioned SRC's PinPointCRM. You can
download a trial version from ftp://ftp.extendthereach.com/GET/PinPointCRM/

Thanks, everyone!
- Bill Thoen



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


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





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



RE: MI-L MapBasic - Cannot find .MBX

2005-09-29 Thread Jakob Lanstorp
You properly compiled an MBO and not a MBX. See if you a MBO and not a
MBX file on the disk.

Since your are new to MapBasic you properly don't use MBO files yet. So
check to see if you use a function or call a sub procedure in your code
that is not present in you file. This will generate a MBO file. You also
must have a Main procedure to get a MBX file.

I think you mean Compile current file and not Compile current
project.

HTH,
Jakob Lanstorp
Senior Consultant
Geographical Information  IT

COWI A/S
Odensevej 95
5260 Odense S.

Tel  +45 6311 4900
Fax  +45 6311 4949
Mob  +45 5050 8087
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
http://www.cowi.com


-Original Message-
From: Carolyn Bergin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 29, 2005 11:11 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic - Cannot find .MBX


Hi list,

Im not sure why but for the last two days Ive been having this problem.
Im fairly new to MapBasic but ive been able to compile my projects
easily so far.

Maybe im forgetting something.

Im creating a new file and saving it.
Once im done with the code im choose Compile current project

The applications comes back saying its compiled sucessfully, no errors

When I choose run I get the error could not find mapbasic application.

Any ideas why?

Thanks to all

Carolyn
 

 

 



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




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



Re: MI-L MapBasic Sample Applications

2005-08-11 Thread Bill Thoen
On Thu, 11 Aug 2005, Ronning, Christine wrote:

 1) Does anyone know of a source I can use to look at the coding for some
 MapBasic example applications?  I have tried opening the .MB files that
 come with MapInfo both in MapBasic and in notepad, but it looks like
 things are encrypted.  I also searched the MapInfo-L list archives, but
 couldn't find anything useful.

MapBasic source code (files with a .mb extension, not .mbx) are plain 
text. They're not encrypted. You must have tried to open an .mbx file. 
Also there's tons of MapBasic source code at the Directions Magazine Free 
Tools site. There's also plenty of examples in your C:\Program 
Files\MapInfo\MapBasic\SAMPLES\MAPBASIC directory. What you might have 
trouble finding is a few simple examples that get you through the basics. 
Those sorts of things are presented in the standard MapBasic 2-day course 
offered by MapInfo and many resellers (if you ever get to Denver, I teach 
that course at Primus Geographics' offices, but you can get that training 
from MapInfo partners in Canada too.)

But if you're determined to teach yourself, I'd start by perusing the
MapBasic Reference manual, and then dig into the sample applications that
come with MapBasic (mentioned above.) I wouldn't say these are the most
elegant examples of MapBasic programming, but they will show you how to 
get the job done.

The main advice I teach in my class is to use the MapBasic window to write
the complicated code for things like opening tables, making thematic maps
and setting layers and styles in map windows. This doesn't write the most
flexible code, but if you're a beginner, it's amazingly productive. Next,
learn to understand the online help pages. They're great. People who say
MapInfo's help stinks are just plain wrong.

And perhaps your best resource is this here mailing list. It helps to 
ask only one question per message, and provide an example of the 
*relevant* code that's giving you trouble. Make it easy for people to 
verify your problem and don't ask too many questions at a time, and you'll 
get results.

 2) I would like to develop a MapBasic application that links a thematic
 map to the layout view.  My layout contains a thematic map and
 corresponding rectangular objects that are meant to represent each
 geography found on the map.  Beside these rectangular objects are text
 boxes that list the geography Id and value associated with it.  I would
 like to run a MapBasic program that updates and sorts the rectangles and
 text boxes based on the thematic map instead of having to do it manually
 each time.

Erm... You might want to try this in steps. Have you tried using the
Cartographic legend commands, or are you really set on building your own
legend manager? You *can* build your own, and you can do some really neat
things in a layout window, but creating a custom legend manager is not a
project for a beginner. Not that you shouldn't try, but I'd say learn to 
use the tools that exist (i.e. cartographic legend) before you attempt to 
blaze new trail.

- Bill Thoen


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



RE: MI-L MapBasic Text object question

2005-06-20 Thread Jacques Paris
Not knowing if there has been any meaningful development since 6.50 in the
area of text objects, I would consider that question as the perfect source
of frustration for MB programmers. You are right, the MBR of a text object
enclose the line if any. I ran a little test that seems to indicate there
could be a way to rebuild the text rectangle itself.

I made the assumption that the other extremity of the line (the one not on
the MB) is the centroid of the text itself. If Xmin (with the line end) 
CentroidX(text_object)  then Xmini of text object = Xmax - 2 *( Xmax -
CentroidX) . Same principle in the Y direction.

I have noted two fascinating thing: 1 - the centroidx/y() functions are not
affected by the existence of a line and 2 - the Xmax of a text object (with
or without a line) may not correspond to the actual right side end of the
text rectangle.

I have discussed that last point at length
(www.paris-pc-gis.com/d_a/da_start.htm) where I have shown that the
extremity of a text object is basically irrelevant in most cases and should
not be given any credibility MI does not use that information to display the
text

A last remark, my suggestion should be tested to take into account slanted
text objects.

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com

-Original Message-
From: Canfield, Andrew [mailto:[EMAIL PROTECTED]
Sent: June 20, 2005 17:26
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic Text object question

To all who may know,
Using Mapbasic how do I get the minimum bounding rectangle for just
the text of a text object when it has an arrow pointing to something. Using
MBR() or using ( ObjectGeography(Lyr.Obj,1), ObjectGeography(Lyr.Obj,2),
ObjectGeography(Lyr.Obj,3), and ObjectGeography(Lyr.Obj,4) to create a
rectangle ) both yield the same thing. They give me the MBR for the entire
entity including the arrow. I need the MBR of just the text. Does anyone
know how I can accomplish this?
Thank you,
Andy


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



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



Re: MI-L MapBasic Text object question

2005-06-20 Thread Phil Waight
The method I use is to recreate the object in memory using all the attributes 
of the object you're querying, at its shifted position.

oText = CreateText( window_id , x , y , text , angle , anchor , offset ) 

and

otextMBR =  mbr (oText)

The other reason to do this (recreate oText) is if you need the rectangle of a 
rotated text object. The method here is to get the MBR of the unrotated object 
and then rotate the MBR about the anchor point.

Regards,
Phil Waight.



-Original Message-
From: Canfield, Andrew [mailto:[EMAIL PROTECTED]
Sent: June 20, 2005 17:26
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic Text object question

To all who may know,
Using Mapbasic how do I get the minimum bounding rectangle for just
the text of a text object when it has an arrow pointing to something. Using
MBR() or using ( ObjectGeography(Lyr.Obj,1), ObjectGeography(Lyr.Obj,2),
ObjectGeography(Lyr.Obj,3), and ObjectGeography(Lyr.Obj,4) to create a
rectangle ) both yield the same thing. They give me the MBR for the entire
entity including the arrow. I need the MBR of just the text. Does anyone
know how I can accomplish this?
Thank you,
Andy



RE: MI-L MapBasic and Excel

2005-06-06 Thread Jorge Gil
Hi Cathy,
 
You might even write it so that the file runs with the default
application for that file type wherever the application is installed.
It's better than to hard code the path to Excel because not everyone has
the same installation path or might have different applications to
handle Excel files.


Declare Function FindExecutable Lib shell32.dll Alias
FindExecutableA
(ByVal lpFile As String, ByVal lpDirectory As String, lpResult
As String *256) As Integer
Declare Sub Main

Sub Main
Dim err_code As Integer
Dim executable_path As String *256
Dim file_path, file_name As String

file_path = C:\'path to the file
file_name = Book1.xls'name of the file to open

If FileExists(file_path + file_name) Then
  err_code = FindExecutable(file_name, file_path,
executable_path)
Run Program executable_path ++ file_path + file_name
End If
End Sub

Jorge


-Original Message-
From: OSullivan. Jerry (IT Solutions) [mailto:[EMAIL PROTECTED] 
Sent: 03 June 2005 15:08
To: Cathy Coldrey; Mapinfo-L@lists.directionsmag.com
Subject: RE: MI-L MapBasic and Excel

Cathy,

You should be able to pass the name of the excel file as a parameter as
below:

Run program C:\Program Files\Microsoft Office\Office10\EXCEL.EXE
C:\Book1.xls

Jerry

-Original Message-
From: Cathy Coldrey [mailto:[EMAIL PROTECTED]
Sent: 03 June 2005 14:35
To: Mapinfo-L@lists.directionsmag.com
Subject: MI-L MapBasic and Excel


 Hi,
I am writting a MapBasic programme that I want to open a document in
Excel as an external document. I can open Excel by using the run
programme comand, but am uncertain how to then open a specific .xls file
at the same time. Has anyone attempted to solve a problem like this
before? If so could you shed some light on the subject? Many thanks
:) Cathy 


* ** *** ** * ** *** ** * ** *** ** * 
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. 
Any views or opinions presented are solely those of the author, and do
not necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not
guarantee 
that either are virus-free and accepts no liability for any damage
sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *


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





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



RE: MI-L MapBasic and Excel

2005-06-03 Thread OSullivan. Jerry \(IT Solutions\)
Cathy,

You should be able to pass the name of the excel file as a parameter as
below:

Run program C:\Program Files\Microsoft Office\Office10\EXCEL.EXE
C:\Book1.xls

Jerry

-Original Message-
From: Cathy Coldrey [mailto:[EMAIL PROTECTED] 
Sent: 03 June 2005 14:35
To: Mapinfo-L@lists.directionsmag.com
Subject: MI-L MapBasic and Excel


 Hi,
I am writting a MapBasic programme that I want to open a document in
Excel as an external document. I can open Excel by using the run
programme comand, but am uncertain how to then open a specific .xls file
at the same time. Has anyone attempted to solve a problem like this
before? If so could you shed some light on the subject? Many thanks
:) Cathy 


* ** *** ** * ** *** ** * ** *** ** * 
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. 
Any views or opinions presented are solely those of the author, and do not 
necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *


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



RE: MI-L MapBasic help

2005-05-19 Thread Peter Horsbøll Møller
Here I guess the problem is that the variable has been put in quoutes. remove 
the quotes and it whould be working

If CommandInfo(CMD_INFO_DLG_OK) Then 
Select * from parcels_shape_gda94 
where Pid = Int(search_pid) into pid_sel
End If
If TableInfo (pid_sel, TAB_INFO_NROWS) = 1 Then 
Set Map Clipping Object pid_sel.obj Using Display All
End Program
Else 
Select * from parcels_shape_gda94 
where Pid = Int(search_pid) 
into pot_pid_sel
End If

Peter Horsbøll Møller
GIS Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: Uffe Kousgaard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 19, 2005 7:46 AM
To: mapinfo-l@lists.directionsmag.com
Subject: Re: MI-L MapBasic help


Remember this line at the top of your application:

include mapbasic.def

Kind regards

Uffe Kousgaard
www.routeware.dk


- Original Message - 
From: [EMAIL PROTECTED]
To: mapinfo-l@lists.directionsmag.com
Sent: Thursday, May 19, 2005 4:23 AM
Subject: MI-L MapBasic help


 Hello listers,

 I'm trying to write a MapBasic script that searches two seperate 
 fields in a table to zoom to an area in a Map Window.  I've come up 
 with the following, but it always falls over at the 
 CommandInfo(CMD_INFO_DLG_OK) section - where it says variable not 
 defined.

 Can anyone offer me any help. Also, any help with the rest of it would 
 be much appreciated, I'm a real beginner at this MapBasic thing.

 Thanks, Matt Davis.


 Dim search_pid as Integer

 Dialog
   Title Search
   Control StaticText
 Title Enter PID to find
   Control EditText
 Value search_pid
 Into search_pid
   Control OKButton
   Control CancelButton

 If CommandInfo(CMD_INFO_DLG_OK)
 Then Select * from parcels_shape_gda94 where Pid =
 Int(search_pid) into pid_sel
 End If

 If TableInfo (pid_sel, TAB_INFO_NROWS) = 1
 Then Set Map Clipping Object pid_sel.obj Using Display All
 End Program
 Else Select * from parcels_shape_gda94 where Pid = Int(search_pid) 
 into pot_pid_sel
 End If

 If TableInfo (pot_pid_sel, TAB_INFO_NROWS) = 1
 Then Set Map Clipping Object pot_pid_sel.obj Using Display All 
 Else
 Dialog
 Title That's not a valid PID
 Control OKButton
 End If

 Matt Davis,


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



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



Re: MI-L MapBasic help

2005-05-18 Thread Uffe Kousgaard
Remember this line at the top of your application:

include mapbasic.def

Kind regards

Uffe Kousgaard
www.routeware.dk


- Original Message - 
From: [EMAIL PROTECTED]
To: mapinfo-l@lists.directionsmag.com
Sent: Thursday, May 19, 2005 4:23 AM
Subject: MI-L MapBasic help


 Hello listers,

 I'm trying to write a MapBasic script that searches two seperate fields in
 a table to zoom to an area in a Map Window.  I've come up with the
 following, but it always falls over at the CommandInfo(CMD_INFO_DLG_OK)
 section - where it says variable not defined.

 Can anyone offer me any help. Also, any help with the rest of it would be
 much appreciated, I'm a real beginner at this MapBasic thing.

 Thanks, Matt Davis.


 Dim search_pid as Integer

 Dialog
   Title Search
   Control StaticText
 Title Enter PID to find
   Control EditText
 Value search_pid
 Into search_pid
   Control OKButton
   Control CancelButton

 If CommandInfo(CMD_INFO_DLG_OK)
 Then Select * from parcels_shape_gda94 where Pid =
 Int(search_pid) into pid_sel
 End If

 If TableInfo (pid_sel, TAB_INFO_NROWS) = 1
 Then Set Map Clipping Object pid_sel.obj Using Display All
 End Program
 Else Select * from parcels_shape_gda94 where Pid = Int(search_pid) into
 pot_pid_sel
 End If

 If TableInfo (pot_pid_sel, TAB_INFO_NROWS) = 1
 Then Set Map Clipping Object pot_pid_sel.obj Using Display All
 Else
 Dialog
 Title That's not a valid PID
 Control OKButton
 End If

 Matt Davis,


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



RE: MI-L MapBasic Geocoding

2005-04-08 Thread Peter Horsbøll Møller
Mike,

You have a variable called gnWinId that should hold the ID of the Map. 
Appearently you have assigned any value to this variable as it is zero (0).

You need to assigned the ID of the FrontWindow() (if it is a map window) or any 
map window. This can be done with this command:

'**Asumming that the active window is a map
gnWinId = FrontWindow()

HTH,
Peter Horsbøll Møller
GIS Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 7:11 PM
To: 'mapinfo-l@lists.directionsmag.com'
Subject: MI-L MapBasic Geocoding


Hello Everyone,
I am GIS student working on a custom application.  I am trying to automate a 
geocoding task in MapBasic v4.5 and continually get the same error.  I can't 
figure out what the problem is and have tried numerous things.  I am hoping 
someone can give me a little insight here.  My code for the sub is below. The 
error I receive is:

invalid window identifier:0, it occurs at the line highlighted below:

Sub GeocodeTest
Dim fx, fy as float

'***
'* Set for finding the address
'***
Find Using BCrds(street)
Find 2419 Marine Drive Interactive

'**
'* If found, position the map.
'**
If (CommandInfo(CMD_INFO_FIND_RC) =1) Then
fx = CommandInfo(CMD_INFO_X)
fy = CommandInfo(CMD_INFO_Y)
Set Map Layer retailcomps_GC Editable On
Insert Into retailcomps_GC (obj) Values(CreatePoint(fx,fy))
Set Map
Window gnWinId
---Center (fx, fy) --
Zoom 1 Units mi
AutoLabel Layer retailcomps_GC
Else
Note Address not found.
End If
End Sub

I am currently running MapInfo version 7.8.  Thanks in advance for any help!

Mike Mayer

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



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



RE: MI-L MapBasic Question

2005-03-23 Thread Terry McDonnell
Johanna

MB Help can explain Processing a MultiListBox control better than I:

Processing a MultiListBox control

To read what items the user selected from a MultiListBox control, assign a 
handler procedure that is called when the user dismisses the dialog (for 
example, assign a handler to the OKButton control). Within the handler 
procedure, set up a loop to call ReadControlValue( ) repeatedly. 
The first call to ReadControlValue( ) returns the number of the first selected 
item; the second call to ReadControlValue( ) returns the number of the second 
selected item; etc. When ReadControlValue( ) returns zero, you have exhausted 
the list of selected items. If the first call to ReadControlValue( ) returns 
zero, there are no list items selected. 

Not sure what you mean by a dataset, but, if a series of table s to be mapped, 
I assume your listbox items come from a 1-D array so you've already 
concatenated your path and table names into array strings, e.g.

I = 1
Fetch first from MyTable
Do while not EOT( MyTable)
  laMyPathArray( I) = MyTable.Path + \ + MyTable.DataSet
  Fetch next from MyTable
  I = I + 1
Next
 
In the above help text you have a loop in which you get each value from the 
list into a variable, say.  E.g.

lcNextTable = laMyPathArray( I) + .TAB

With each you can issue:

Open Table lcNextTable Interactive

This the correct idea?  HTH

Terry McDonnell

-Original Message-
From: Johanna D. Tomesch [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2005 15:00
To: Terry McDonnell
Subject: MI-L MapBasic Question 

Hi all,

I have a question regarding MapBasic and was hoping someone could point me in 
the right direction.

I am writing a program that has a table containing the names and paths to
multiple data sets.   All the data set names populate a MultiListBox.  When
I select a data set out of the MultiListBox I want the program to  read the
path out of the table and then open the data set.   I can't quite figure
this out.
Does anyone have any suggestions?

Thanks a lot,

Johanna D. Tomesch
Research Associate
Bureau of  Water Supply Protection
New York State Dept. of Health
Ph:  (518) 402-7728
Fax:  (518) 402-7599
[EMAIL PROTECTED]


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





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



RE: MI-L MapBasic SQL Problem

2005-03-23 Thread Stuart Morrison
You can use a subselect
 Select * from Temp5 Where Lieu in (select ID_POINT from Temp6) into 
s_NomTable

If you index the columns Lieu and ID_POINT you will also speed up your 
process

Regards
Stuart

From: [EMAIL PROTECTED]
To: MapInfo-L@lists.directionsmag.com
Subject: MI-L MapBasic SQL Problem
Date: Wed, 23 Mar 2005 14:36:22 -0500
Hi, I try to select some data trought MapBasic between two different Table.
The first table contains the data I want to select if one field value is
into another table field Value..
This is the problematic code
Select * from {Temp5,Temp6}
 Where Temp5.Lieu = Temp6.ID_POINT into s_NomTable
The 2 Tables Temps contain a lot of Data. The field ID_Point and Lieu
contain the same type of Data with same format. It contain an Id number for
a point. The Temp6 is a georeferenced one and I want to get only the Temp5
data associated to Temp6.
EveryTime I run the program, at this line, it crash and it tell me that
Temp6.ID_Point is not define...
Some one can help me !?
Thanks
-
Remi Blanchette-Gobeil
Stagiaire Universitaire
 Hydro-Québec http://www.hydroquebec.com/images/logo_hq_couleur.gif
Plan de Maintenance
Centre Administratif St-Bruno
705, boul. Clairevue Ouest
Rez-de-Chaussée
St-Bruno de Montarville ( Québec )
J3V 6B6
Tél Bell : 450-441-7200 ext 6098
Tél HQ : 0-441-6098
Télécopieur : 450-441-7389
Cellulaire : 819-580-0444
Courriel : [EMAIL PROTECTED]

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


Re: MI-L MapBasic: Generic arrays

2005-03-11 Thread Bill Thoen
On Fri, 11 Mar 2005, Kristof Vydt wrote:
 
 Is there a way to use some generic array type, so that I don't have to
 duplicate all my functions for all datatypes ?

You could make an array of variants in which you declare a structure
like:

type tVariant
  type as smallint
  data as string
end type

and then declare your function as: 
Join ( a() As tVariant, ByVal separator As String ) As String

You'd store all data types as string representations of their native 
types, and you would identify the types as smallints according to the 
defined constants like so:

define V_INTEGER 1
define V_STRING 2
define V_DATE 3
...

You'd use it like so:

dim sResult as string
dim a() as tVariant

redim a(100)

a(1).type = V_DATE
a(1).data = 20050310
a(2).type = V_DATE
a(2).data = 17760704
...

sResult = Join (a, ;)

Before your function would operate on the data part, it would check the
type and call the appropriate function to deal with it. You might even
declare the type as a type containing an array instead (if you knew that
all elements of your array would be the same type)

define type tVariantArray
  type as smallint
  data() as string
end type

You can even implement totally different types of variables this way too.
A BLOB (binary large object) might be implemented as a hexadecimal-coded
string, or it might be a pointer into a file or a filename itself. 

It's not as speedy as using MapBasic native types, but that's just an 
issue with MapBasic. The concept is basically what faster languages use 
anyway, and if you can trade speed for algorithmic simplicity, you might 
consider it.

Of course, from the looks of your Join() function, I would simply just 
make sure that I pass the string representations of the array elements and 
just use a string array in join. But if you think outside the box, there 
are always alternatives!

- Bill Thoen



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



RE: MI-L MapBasic Question

2005-03-04 Thread Ben A Greenberg
Charles 

I replied directly to your email yesterday, you apparently did not recieve it.
I created a simple tool to batch convert world files to tab files (assuming the 
projections are identical) and then create a seamless table of all the imagery.
Let me know if you would like me to send it to you.

Ben  Greenberg
GIS Coordinator
NAI MLG Commercial
262-797-9400


-Original Message-
From: Charles Kane [mailto:[EMAIL PROTECTED]
Sent: Friday, March 04, 2005 2:01 PM
To: mapinfo-l@lists.directionsmag.com
Subject: MI-L MapBasic Question


Sorry to repost but I did not get any replies:

I have a directory containing approximately 2000 georeferenced tif files and I 
need to open them in MapInfo. The problem I am running into is twofold:

1) It asks me to specify the projection for each raster (they are all the same 
projection) - it would take hours to do manually.
2) I do not have a table containing the raster names otherwise I would write a 
program to do this

Does anyone know of a program or the code that will allow me to open files in 
batch and specify the projection?
How about code to open all of the files that are in the same directory without 
knowing the names?

Thanks in advance.

Charles Kane

CDS Business Mapping
67 Broad Street, 6th Floor
Boston, MA 02109

Phone: 617-737-
Fax: 617-737-6233

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



Re: MI-L MapBasic Question

2005-03-04 Thread Bill Thoen
On Fri, 4 Mar 2005, Charles Kane wrote:

 Does anyone know of a program or the code that will allow me to open
 files in batch and specify the projection? How about code to open all of
 the files that are in the same directory without knowing the names?

I believe there's MapBasic code at Jacques Paris' web site that shows you 
how to use the FindFirst and FindNext Windows API calls from MapBasic to 
get lists of files from directories.

As to registering the TIF files, you'll need to know their extents to 
register them. Years ago, Dimitry Bogdanov posted some code to MapInfo-L 
that showed where to get the pixel width and heights of various raster 
formats. Here's the bit for TIFF files:

Open File FileName$ For Binary Access Read As #1
Get #1, 1, iByteOrder
If iByteOrder = 19789 Then 'MM
  Close File #1
  Open File FileName$ For Binary Access Read As #1 ByteOrder HIGHLOW
End If
Get #1, 5, Offset
Offset = Offset + 1
Get #1, Offset, NumTags
For i = 0 To NumTags - 1
  Get #1, 2 + Offset + i * 12, Val
  Do Case Val
Case 256
  Get #1, 10 + Offset + i * 12, siWidth
Case 257
  Get #1, 10 + Offset + i * 12, siHeight
  Exit For
  End Case
Next
Width = siWidth
Height = siHeight

So if no one has any ready-to-use solution, this should give you something 
to start with!

- Bill Thoen



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



RE: MI-L MapBasic Buttons

2005-02-21 Thread Canfield, Andrew
In your mapbasic install folders there should be a folder called ICONDEMO.
Build that .mbx from the .mb and run it then you can graphically see what
all the icons are and their numbers.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, February 21, 2005 6:43 AM
To: MapInfo-L@lists.directionsmag.com
Subject: MI-L MapBasic Buttons






Is there somewhere that I can see visually what each icon looks like in
regards to MapBasic button creation?  That is for example:

define MI_ICON_COMMUNICATION_8   75



Philip Lesnik
Research Systems Analyst, Market Research
General Growth Properties, Inc.
110 N. Wacker Drive   BSC 3-13
Chicago, IL  60606
312-960-2998
312-960-5519 (fax)
[EMAIL PROTECTED]




-
+++  Notice: This
e-mail including attachments) is covered by the Electronic Communications
Privacy Act, 18 U.S.C. ?? 2510-2521, is confidential and may be legally
privileged. If you are not the intended recipient, you are hereby notified
that any retention, dissemination, distribution, or copying of this
communication is strictly prohibited. Please reply to the sender that you
have received the message in error, then delete it. Thank you.
+++


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

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



Re: MI-L MapBasic Buttons

2005-02-21 Thread Vladimir Lashin
Hello Philip,

Monday, February 21, 2005, 5:43:18 PM, you wrote:


PLgc Is there somewhere that I can see visually what each icon looks like in
PLgc regards to MapBasic button creation?  That is for example:

PLgc define MI_ICON_COMMUNICATION_8   75
MBBuilder's Toolbar Editor provide way to define button icon visually.
see attachment.



-- 
Best regards,
Vladimir Lashin
microOLAP Technologies LLC

---
MBBuilder - Visual Development Tool for MapBasic - 
http://www.microolap.com/products/gis/mbbuilder
Raster Handler for ERDAS Imagine to MapInfo -
http://www.microolap.com/products/gis/erdas
MapInfo Callbacks Manager ActiveX - http://www.microolap.com/products/gis/micm
EasyMap VCL - http://www.microolap.com/products/gis/easymap
---

mailto:[EMAIL PROTECTED]
http://www.microolap.com/gis/ - GIS related products
-
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15356

Re: MI-L MapBasic Compatibility

2005-02-02 Thread Uffe Kousgaard
hello Greg,

Inside mapbasic applications there is a code telling MapInfo what
version of mapinfo will for sure run the application. This is the same
as the version of Mapbasic that you use when compiling.

If you are sure nothing has been added in the code, that requires
MapInfo 7.8, just edit the mbx application. You will need an editor that
allows editing in binary mode - UltraEdit for instance makes it quite
easy to see, what to change.

Kind regards

Uffe Kousgaard
www.routeware.dk

- Original Message - 
From: Greg Gainey [EMAIL PROTECTED]
To: MapInfo-L@lists.directionsmag.com
Sent: Wednesday, February 02, 2005 1:23 PM
Subject: MI-L MapBasic Compatibility


Hi Listers

Has anyone noticed a problem with backwards compatibility running an MB
app compiled with MapBasic 7.8 on an earlier version of MapInfo (7.0,
7.5).?

I recently tried to run my app in MI 7.5 but received an error message
telling me I need MI 7.8 to run the app. This is strange and I haven't
added any code to the app that makes use of the new features in MI 7.8.

I cannot find any documentation or reference to say that it won't work.
In fact everything hints at the opposite.


regards
Greg


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



Re: MI-L MapBasic Compatibility

2005-02-02 Thread Data Directions
Greg,

Open the MBX in any editor (eg. Wordpad, Codewright, Ultraedit, etc)  and 
change the second line to the version you require. As an example, here are the 
first three lines in one of our MBX's:

!App
!Version 450
!Charset WindowsLatin1
Even though we created it in version 7.80, you can see how it has been rolled 
back to run on version 4.5 of MapInfo. Of course, it your MBX's use any of the 
newer features in MapInfo, those won't work.

Regards,

Bill

William Donaldson
GIS Applications Manager

Data Directions
240 Jersey St
Wembley, WA  6014
AUSTRALIA

mobile: 0401 67 1889
fax: 08 9387 1265

email: [EMAIL PROTECTED]
web: www.datadirections.com.au

==

 Original Message - 

From: Greg Gainey [EMAIL PROTECTED]
To: MapInfo-L@lists.directionsmag.com
Sent: Wednesday, February 02, 2005 8:23 PM
Subject: MI-L MapBasic Compatibility


 Hi Listers
  
 Has anyone noticed a problem with backwards compatibility running an MB
 app compiled with MapBasic 7.8 on an earlier version of MapInfo (7.0,
 7.5).?
  
 I recently tried to run my app in MI 7.5 but received an error message
 telling me I need MI 7.8 to run the app. This is strange and I haven't
 added any code to the app that makes use of the new features in MI 7.8.
  
 I cannot find any documentation or reference to say that it won't work.
 In fact everything hints at the opposite.
  
  
 regards
 Greg
 

RE: MI-L MapBasic Compatibility

2005-02-02 Thread David Mellors
Hi Greg,

Try http://www.stopwatchmaps.com/products/mbxver.html

A very useful tool that allows you to set the version compatibility back to an 
earlier version without editing the mbx yourself

David Mellors
 
First Light Associates
 
T:+44 (0)1273 671227
M:   +44 (0)7802 708361
E:[EMAIL PROTECTED]
W:   http://www.firstlightassociates.co.uk
 
__

The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual or 
entity to whom it is addressed and others authorised to receive it. If you are 
not the intended recipient, please notify the sender immediately and you are 
hereby notified that any disclosure, copying, distribution or taking any action 
in reliance on the contents of this information is strictly prohibited and may 
be unlawful.

  

-Original Message-
From: Data Directions [mailto:[EMAIL PROTECTED] 
Sent: 02 February 2005 12:38
To: Greg Gainey; MapInfo-L@lists.directionsmag.com
Subject: Re: MI-L MapBasic Compatibility

Greg,

Open the MBX in any editor (eg. Wordpad, Codewright, Ultraedit, etc)  and 
change the second line to the version you require. As an example, here are the 
first three lines in one of our MBX's:

!App
!Version 450
!Charset WindowsLatin1
Even though we created it in version 7.80, you can see how it has been rolled 
back to run on version 4.5 of MapInfo. Of course, it your MBX's use any of the 
newer features in MapInfo, those won't work.

Regards,

Bill

William Donaldson
GIS Applications Manager

Data Directions
240 Jersey St
Wembley, WA  6014
AUSTRALIA

mobile: 0401 67 1889
fax: 08 9387 1265

email: [EMAIL PROTECTED]
web: www.datadirections.com.au

==

 Original Message - 

From: Greg Gainey [EMAIL PROTECTED]
To: MapInfo-L@lists.directionsmag.com
Sent: Wednesday, February 02, 2005 8:23 PM
Subject: MI-L MapBasic Compatibility


 Hi Listers
  
 Has anyone noticed a problem with backwards compatibility running an 
 MB app compiled with MapBasic 7.8 on an earlier version of MapInfo 
 (7.0, 7.5).?
  
 I recently tried to run my app in MI 7.5 but received an error message 
 telling me I need MI 7.8 to run the app. This is strange and I haven't 
 added any code to the app that makes use of the new features in MI 7.8.
  
 I cannot find any documentation or reference to say that it won't work.
 In fact everything hints at the opposite.
  
  
 regards
 Greg
 

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 31/01/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.3 - Release Date: 31/01/2005
 

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



Re:: MI-L MapBasic Compatibility

2005-02-02 Thread Nigel James
Hi Greg and all

There's a free utility available called MBXVer:

http://www.stopwatchmaps.com/products/mbxver.html

It will check which is the earliest version of MapInfo that your mbx will run 
on and change the code for you. 

Nigel James


On Wed, 2 Feb 2005 23:23:38 +1100 Greg Gainey [EMAIL PROTECTED] wrote:

 Hi Listers
  
 Has anyone noticed a problem with backwards compatibility running an MB
 app compiled with MapBasic 7.8 on an earlier version of MapInfo (7.0,
 7.5).?
  
 I recently tried to run my app in MI 7.5 but received an error message
 telling me I need MI 7.8 to run the app. This is strange and I haven't
 added any code to the app that makes use of the new features in MI 7.8.
  
 I cannot find any documentation or reference to say that it won't work.
 In fact everything hints at the opposite.
  
  
 regards
 Greg

__
Nigel N James
Map Room
Bodleian Library
Broad St
Oxford
OX1  3BG
UK
tel : +44 1865 277013
fax: +44 1865 277139 
Visit the award-winning Map Room Home Page at: 
http://www.bodley.ox.ac.uk/guides/maps/


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



RE: MI-L MapBasic Compatibility

2005-02-02 Thread Greg Gainey
ML's

Thanks to all of those that replied, 

The always helpful Uffe Kousgaard and Bill Donaldson both similar
solutions to edit the mbx with an editor that allows binary mode
editing.

Thanks to David Mellors and Nigel James pointing me to the free utility
from Stopwatch Maps at
http://www.stopwatchmaps.com/products/mbxver.html.


BGNS
Greg




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



Re: MI-L MapBasic Compatibility

2005-02-02 Thread Bill Thoen
On Wed, 2 Feb 2005, Uffe Kousgaard wrote:

 If you are sure nothing has been added in the code, that requires
 MapInfo 7.8, just edit the mbx application. You will need an editor that
 allows editing in binary mode - UltraEdit for instance makes it quite

Ever since 7.0 came out, I've noticed that sometimes this doesn't work.  
Even in cases where I was sure there was no code in the app that was
beyond 6.0, when I've rolled back an MBX from 7.5 to 6.0, I found that in
at least some cases, the mbx runs, but soon crashes mysteriously. If I
compile the same app in MB 6.0, everything's fine. I've run into this at
least three times already. I finally decided to keep my 6.0, 7.0 and 7.5
MB compilers online until I can figure out what's really going on.

- Bill Thoen



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



Re: MI-L Mapbasic: Creating polylines with multiple sections

2005-01-17 Thread Robert Crossley
Maybe the easiest way would be to create these segments as an array of  
separate polyline objects, and then combine them into one when you have  
finished.

r
On Mon, 17 Jan 2005 16:44:45 +0800, David Baker [EMAIL PROTECTED] wrote:
I have a MapBasic 4.5 command:
	Alter Object TempPolyLine Node Add Position PolylineSections,  
ObjectInfo(TempPolyLine, OBJ_INFO_NPNTS) + 1 (PointLong, PointLat)

TempPolyLine is my polyline which was originally created with:
Create Pline Into Variable TempPolyLine 0
PolylineSections is a SmallInt value (one or larger), identifying one  
section from a
polyline object.

ObjectInfo(TempPolyLine, OBJ_INFO_NPNTS) + 1 is of course the number  
of
existing nodes + 1, to refer to my new node number that I am about to  
create.

PointLat  PointLong are my Latitude  Longitude of the node I want to  
create.


I am reading in polylines from another file format (Garmin .mp polish  
format). These
polylines have multiple sections, so I want to create the MapInfo  
polylines with the same
multiple sections.

All works well while PolylineSections is 1, but as soon as I try to add  
the first node after
changing PolylineSections to 2, I get a MapBasic error:

Alter Object Node Add failure
Am I trying to do this the wrong way? Can I just keep adding points   
the new section
will be created automatically, or am I missing some command to inform  
MapBasic that I
am adding in a new section?

Thanks,
Dave

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


--

Robert Crossley
Agtrix P/L
9 Short St
PO Box 63
New Brighton 2483
Far Southern Queensland
AUSTRALIA
153.549004 E 28.517344 S
P: 02 6680 1309
F: 02 6680 5214
M: 0419 718 642
E: [EMAIL PROTECTED]
W: www.agtrix.com
W: www.wotzhere.com
-
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 14873


RE: MI-L Mapbasic: Creating polylines with multiple sections

2005-01-17 Thread Peter Horsbøll Møller
If you look at the syntax for create Polyline, I think you need to specify how 
many segments it should contain:

Create Pline 
[  Into  { Window   window_id  |  Variable   var_name } ] 
[ Multiple num_sections ]
num_points
 ( x1,  y1)  ( x2,  y2)  [ ... ]

If is the Multiple num_sections I'm refering to.

But, I think this was added in a later version of MapInfo, and it is not 
available in MB 4.5
So I guess you have to create only single segment polylines, and then combine 
them everytime you shift to next segment

Something like this:

Do While (...)
'**Here you read the segment#, point# and the coordinates

If nCurSegm  nNextSegm Then
If nNumSegment = 0 Then

ElseIf nNumSegment = 1 then
oMultiSegment = oSingleSegment
else
oMultiSegment = Combine(oMultiSegment, oSingleSegment)
End if

Create PLine Into Variable TempPolyLine 0   

nNumSegment = nNumSegment + 1
End if

'**Here you add the nodes
Loop

Peter Horsbøll Møller
GIS Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: David Baker [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 17, 2005 9:45 AM
To: MapInfo-L@lists.directionsmag.com
Subject: MI-L Mapbasic: Creating polylines with multiple sections


I have a MapBasic 4.5 command:

Alter Object TempPolyLine Node Add Position PolylineSections, 
ObjectInfo(TempPolyLine, OBJ_INFO_NPNTS) + 1 (PointLong, PointLat)

TempPolyLine is my polyline which was originally created with:

Create Pline Into Variable TempPolyLine 0

PolylineSections is a SmallInt value (one or larger), identifying one section 
from a 
polyline object.

ObjectInfo(TempPolyLine, OBJ_INFO_NPNTS) + 1 is of course the number of 
existing nodes + 1, to refer to my new node number that I am about to create.

PointLat  PointLong are my Latitude  Longitude of the node I want to create.



I am reading in polylines from another file format (Garmin .mp polish 
format). These 
polylines have multiple sections, so I want to create the MapInfo polylines 
with the same 
multiple sections.

All works well while PolylineSections is 1, but as soon as I try to add the 
first node after 
changing PolylineSections to 2, I get a MapBasic error:

Alter Object Node Add failure

Am I trying to do this the wrong way? Can I just keep adding points  the new 
section 
will be created automatically, or am I missing some command to inform MapBasic 
that I 
am adding in a new section?

Thanks,

Dave




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



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



RE: MI-L Mapbasic: Creating polylines with multiple sections

2005-01-17 Thread David Baker
On 17 Jan 2005 at 10:37, Peter Horsbøll Møller [EMAIL PROTECTED] wrote:

 If you look at the syntax for create Polyline, I think you need to specify
 how many segments it should contain:

 But, I think this was added in a later version of MapInfo, and it is not
 available in MB 4.5 So I guess you have to create only single segment
 polylines, and then combine them everytime you shift to next segment

Thanks Peter (and Robert). You are correct that this parameter isn't in 4.5, so 
your 
lateral thinking got me out of trouble.

   ElseIf nNumSegment = 1 then
oMultiSegment = oSingleSegment
   else
oMultiSegment = Combine(oMultiSegment, oSingleSegment)
   End if

This idea works nicely.

Excellent - I can hang onto my MapBasic 4.5 a little bit longer. :-)

Dave

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



RE: MI-L Mapbasic tablename help needed

2004-12-20 Thread Terry McDonnell
Ross

I think this should work:

Combine your table name and first col name together in a string.  I'm
not sure the generic col1 would work.

You can use the ColumnInfo func to get the name of col1

cColName = ColumnInfo(YourTable, Col1, COL_INFO_NAME)

then...

cFullColName = YourTable + . + cColName

the use this in the if statement...

If cFullColName = 0

HTH

Terry






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



RE: MI-L MapBasic Null Value

2004-12-08 Thread Hughes, Colleen / Don Mitchell
Hi Bill,

my curiousity is up now.

I am not familiar with nulls in MapBasic myself, but I noticed in MapInfo a
null is a 0 (zero) if the field is numeric and a string field is an empty
string (i.e. ).  At least this is how it is handled in the SQL.

In a string situation, is the empty string in quotations also evaluated as 0
(zero) programmatically by MapInfo?

Don Mitchell


-Original Message-
From: Bill Thoen [mailto:[EMAIL PROTECTED]
Sent: December 7, 2004 5:07 PM
To: John Polasky
Cc: [EMAIL PROTECTED]
Subject: Re: MI-L MapBasic Null Value


On Tue, 7 Dec 2004, John Polasky wrote:

 Using an If...Then statement, how do I tell MapInfo to identify that the
 variable is empty?  I can't use zero for the check obviously, but is
 there a MapBasic code that identifies a null value?

No. A blank is the same as a zero to MapInfo.


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

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



Re: MI-L MapBasic Null Value

2004-12-08 Thread Markus Lindner
MapInfo does not know a NULL - Value,
this is one of the great weaknesses of MapInfo/MapBasic, especially when
working with databases, there is often the situation where NULL has a
complete different meaning than a 0 in a numeric column for example.
If you access Database data with NULL Values, these values are shown in
MapInfo by a 0 for numeric values and by  empty string for character 
Values,
maybe there may be improvements in versions 8.x, i still hope for that.

Regards
Hughes, Colleen / Don Mitchell wrote:
Hi Bill,
my curiousity is up now.
I am not familiar with nulls in MapBasic myself, but I noticed in MapInfo a
null is a 0 (zero) if the field is numeric and a string field is an empty
string (i.e. ).  At least this is how it is handled in the SQL.
In a string situation, is the empty string in quotations also evaluated as 0
(zero) programmatically by MapInfo?
Don Mitchell
-Original Message-
From: Bill Thoen [mailto:[EMAIL PROTECTED]
Sent: December 7, 2004 5:07 PM
To: John Polasky
Cc: [EMAIL PROTECTED]
Subject: Re: MI-L MapBasic Null Value
On Tue, 7 Dec 2004, John Polasky wrote:
 

Using an If...Then statement, how do I tell MapInfo to identify that the
variable is empty?  I can't use zero for the check obviously, but is
there a MapBasic code that identifies a null value?
   

No. A blank is the same as a zero to MapInfo.
-
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 14415
-
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 14423
 

--
CISS TDI GmbH http://www.ciss.de/
Markus Lindner CISS TDI GmbH
Tel. +49 2642 97 80 0  Barbarossastraße 36
Fax. +49 2642 97 80 10 53489 Sinzig, Germany
mailto:[EMAIL PROTECTED]   http://www.ciss.de/
Sitz der Gesellschaft: Sinzig  AG Andernach, HR-Nummer 3357
Geschäftsführer: Dipl.-Math. Joachim Figura, Dipl.-Inform. Berthold Bärk
-
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 14427


RE: MI-L MapBasic Null Value

2004-12-08 Thread Bill Thoen
On Wed, 8 Dec 2004, Hughes, Colleen / Don Mitchell wrote:

 I am not familiar with nulls in MapBasic myself, but I noticed in MapInfo a
 null is a 0 (zero) if the field is numeric and a string field is an empty
 string (i.e. ).  At least this is how it is handled in the SQL.
 
 In a string situation, is the empty string in quotations also evaluated as 0
 (zero) programmatically by MapInfo?

No, an empty string type is not treated as a zero (unless you convert it
to a numeric with the Val() function.) It's just an empty string. Note
that an empty string () for a string type or a zero for a numeric type
are within the valid rnages of their respective types. There is no such
thing as a null value built into MapInfo/MapBasic. If you want a null, you
have to impose a convention to do it.

To get around this, people often use a particular value that's outside the
range of likely values -- like - for elevations, or UNNAMED for
small town names, etc. But for some data there's no value in the valid
range of the type that can be ruled out as unlikely, and if you need a
null in those cases, then you'd better consider storing the value as a
string, and only converting it as needed (a string can store anything as
long as you can fit your data into 254 characters or less... and if you
still need more room, you can use multiple strings.)

- Bill Thoen



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



Re: MI-L MapBasic Null Value

2004-12-07 Thread Bill Thoen
On Tue, 7 Dec 2004, John Polasky wrote:

 Using an If...Then statement, how do I tell MapInfo to identify that the
 variable is empty?  I can't use zero for the check obviously, but is
 there a MapBasic code that identifies a null value?

No. A blank is the same as a zero to MapInfo.


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



Re: MI-L MapBasic

2004-12-06 Thread Bill Thoen
On Mon, 6 Dec 2004, Rakesh Rao wrote:

 I have obtained a licensed copy of MapInfo 7 from our client for
 development use but Mapbasic is not part of it. I understand this is
 something that needs to be purchased separately. Fair enough. This is
 also being arranged by our client but it is likely to take some time to
 complete the formalities. In the meanwhile, is there any way how I can
 obtain it for short time trial use, so as to use my time productively
 while waiting for it to arrive?

I'm afraid not. The Demos and Downloads section for MapBasic on 
MapInfo's website doesn't include a 90-day trial download like most of 
their newer products, so I think you'll to wait for your cliemt to get it 
for you.

- Bill Thoen



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



Re: MI-L MapBasic closing unexpectedly

2004-11-23 Thread Uffe Kousgaard
Hi,

This usually happens when a function, variable or such is declared twice (in
different modules). Look at the section you have just written and compare
with your other modules. It can be very tricky to track, since MapBasic does
nothing to help you.

Regards
Uffe

- Original Message - 
From: Lukas, Paul [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 23, 2004 23:49
Subject: MI-L MapBasic closing unexpectedly


 I'm having trouble with MapBasic when I try to link my modules and the
 project file.  MapBasic will create an error message something to the
 effect:

 MAPBASIC.exe has generated errors and will be closed by Windows.  You
will
 need to restart the program.

 This is happening only when I try to link the project (it does not happen
 while compiling an MBO) and it just started happening out of the blue and
 seems to be linked to a section of code I just added.

 Has anyone experienced this before?

 Paul Lukas



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



RE: MI-L Mapbasic application stop if working in background

2004-11-16 Thread Gilbert Haché
Thanks to all who replied!

Here's the fix that worked for me:

If a progress bar pops up and MI does not have focus, the app will stop.  Issue 
a Set ProgressBars Off near the top of the code, then a Set ProgressBars On 
at the end.

Gilbert



I have a Mapbasic application that freezes when the process is working on a map 
and whenever I activate or use any other application (non Mapinfo) in windows, 
the program stop!

 

 

The program make a treatment of selecting points from a big file. I then create 
a polygon on cosmetic. I make a process of points found in polygon and return a 
status in which Census division (other layer) they fall in (I found the most 
significants). I then make a list of those Census division an place the list in 
a list and this list may be saved in a temp file if too big. I have many other 
process using like creating Convex hull and so. When all treatment done for 
that location, I create other location, new polygons on cosmetic and so. It's a 
huge and long process. I need to have this program to run while I'm working on 
something else in my computer. This is why I use other windows application like 
word, excel, whatever at the same time.

 

Everything works fine until it begins working in background.

 

Any idears?

 

 

 

Gilbert Haché

 

Solutions Consortech Inc.

6300, Auteuil, Bureau 505

Brossard, Québec, Canada, J4Z 3P2

 

Tél/Tel. : (450) 676-1555 Ext. 211

Télécopieur/fax : (450) 676-8851

Courriel/email: [EMAIL PROTECTED]

 


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



RE: MI-L Mapbasic application stop if working in background

2004-11-15 Thread Warren Vick, Europa Technologies Ltd.
Hello Gilbert,

This is most likely to be ones of this lists common discussion items... Pro
has attention deficit disorder. Any operation which brings up a progress
bar, when Pro does not have windows focus, will cause the app to pause and
flash for attention on the Start toolbar. The solution for any MapBasic
program which may need to run in the background is to switch off the
progress bars:

set progressbars off

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

-Original Message-
From: Gilbert Haché [mailto:[EMAIL PROTECTED] 
Sent: 15 November 2004 20:01
To: [EMAIL PROTECTED]
Subject: MI-L Mapbasic application stop if working in background


I have a Mapbasic application that freezes when the process is working on a
map and whenever I activate or use any other application (non Mapinfo) in
windows, the program stop!

 

 

The program make a treatment of selecting points from a big file. I then
create a polygon on cosmetic. I make a process of points found in polygon
and return a status in which Census division (other layer) they fall in (I
found the most significants). I then make a list of those Census division an
place the list in a list and this list may be saved in a temp file if too
big. I have many other process using like creating Convex hull and so. When
all treatment done for that location, I create other location, new polygons
on cosmetic and so. It's a huge and long process. I need to have this
program to run while I'm working on something else in my computer. This is
why I use other windows application like word, excel, whatever at the same
time.

 

Everything works fine until it begins working in background.

 

Any idears?

 

 

 

Gilbert Haché

 

Solutions Consortech Inc.

6300, Auteuil, Bureau 505

Brossard, Québec, Canada, J4Z 3P2

 

Tél/Tel. : (450) 676-1555 Ext. 211

Télécopieur/fax : (450) 676-8851

Courriel/email: [EMAIL PROTECTED]

 




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



RE: MI-L mapbasic - save window as...

2004-11-07 Thread Simmonds, Ashley (DTUP)
are you sure you need to change the DPI or do you just want a larger image?

anywho, the following search may help as it's come up a few times recently:
http://www.google.com/search?hl=enq=%22save+window+as%22+resolution

-Original Message-
From: paul quinlan [mailto:[EMAIL PROTECTED]
Sent: Friday, 5 November 2004 10:07 PM
To: [EMAIL PROTECTED]
Subject: MI-L mapbasic - save window as...


Hi

I have a program that loops through a number of layouts and saves them as 
jpegs. However, no matter what i set the resolution to it allways seems to 
save it at the default for the papersize, in this case 96dpi. This is the 
line of code im using:

strmsg = save window frontwindow() as  + picpath +  type  JPEG  
resolution 400
run command strmsg

Any ideas? Thanks for any suggestions.
Paul

_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


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

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



RE: MI-L Mapbasic code won't execute unless MI has focus

2004-10-28 Thread David Reid
Here's another example of the beauty of this list. I tried this tip Set
Progressbars Off from just the mapbasic window and it works on isolated
issues as well. That may not be news to some but it is to me.  I get a
customer database update daily and re-geocode this 40k record database
every few days, daily if significant changes are made that day.

I wrote a geocoding app in Mapbasic whereby I could have used this tip but
geocoding from mabasic is so slow, at least from my mbx, I never use it any
more, and for the few functions I do perform, the progress bars just
waterlog everything. I can be reading the MI-L in the time it takes to pull
these functions in MI! :)

So, this morning before doing my refresh and geocoding, I happened to think
about this post, opened a Mapbasic window, typed in Set Progressbars Off,
did my various functions, turned the bars back on and viola... It worked
nicely.  Now to incorporate my new found knoggin knowhow into a new app.

Thanks again MI-L, you come through again!  And thanks to David for priming
the pump :)


David Reid



-Original Message-
From: David Baker [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 24, 2004 1:07 AM
To: [EMAIL PROTECTED]
Subject: SUM: MI-L Mapbasic code won't execute unless MI has focus


Thanks to Peter, Warren, Uffe  others who replied by mail. The answer is
below.

And when I read it I vaguely remembered requiring progress bars to be turned
off under 
certain circumstances. In this case I didn't get the connection because the
commit was 
happening so fast that one didn't even see the progress bars appear on the
screen 
anyway, so I wasn't getting all the symptoms.

Thanks for the help - this is a great group.

Dave (who has another question coming!)



On 19 Oct 2004 at 11:26, Peter Horsbøll Møller [EMAIL PROTECTED] wrote:

 This is caused by the fact that MapInfo needs to be in focus before a
 Processbar can process.

  Set Progressbars Off
  Commit Table Vessels
  Set Progressbars On


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 10/08/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 10/08/2004
 


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



RE: MI-L Mapbasic code won't execute unless MI has focus

2004-10-19 Thread Peter Horsbøll Møller
Hi David,

This is caused by the fact that MapInfo needs to be in focus before a Processbar can 
process.

So try to do this:

Print Stops at next line unless front window!
Set Progressbars Off
Commit Table Vessels
Set Progressbars On
Print Commit Table Vessels doesn't execute unless front window!

HTH,
Peter Horsbøll Møller
GIS Developer
Geographical Information  IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis


-Original Message-
From: David Baker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 19, 2004 11:13 AM
To: [EMAIL PROTECTED]
Subject: MI-L Mapbasic code won't execute unless MI has focus


I have a strange one here!

Running MI 4.5 under Windows XP home (but same problem occurs on another PC 
running Win98SE).

I have some code in the RemoteMsgHandler subroutine:

Print Stops at next line unless front window!
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

If I run the MBX it so MI is not the front window (by having Calculator on top so I 
can still 
see the MI message window), and some remote data comes in, the first Print line 
executes, but the 2nd print line doesn't, so it is getting stuck on the Commit Table 
Vessels line.
The MapInfo icon in the task bar flashes orange but that is all that happens. As soon 
as 
I click on the flashing icon to bring MI to the front, the code continues to execute - 
the 
table is committed  the 2nd print statement executes.

Anyone know what is causing this hanging?

I also tried

Print Stops at next line unless front window!
Set Event Processing Off
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

just in case it was one of my other event handlers screwing things up, but same 
symptoms.

Dave

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



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



Re: MI-L Mapbasic code won't execute unless MI has focus

2004-10-19 Thread Uffe Kousgaard
MapInfo is trying to show a progress bar for the commit statement, which
requires focus. Turn off progress bars by calling set progressbars off

Kind regards

Uffe Kousgaard
www.routeware.dk


- Original Message - 
From: David Baker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 11:13 AM
Subject: MI-L Mapbasic code won't execute unless MI has focus


I have a strange one here!

Running MI 4.5 under Windows XP home (but same problem occurs on another
PC
running Win98SE).

I have some code in the RemoteMsgHandler subroutine:

Print Stops at next line unless front window!
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

If I run the MBX it so MI is not the front window (by having Calculator
on top so I can still
see the MI message window), and some remote data comes in, the first
Print line
executes, but the 2nd print line doesn't, so it is getting stuck on the
Commit Table
Vessels line.
The MapInfo icon in the task bar flashes orange but that is all that
happens. As soon as
I click on the flashing icon to bring MI to the front, the code
continues to execute - the
table is committed  the 2nd print statement executes.

Anyone know what is causing this hanging?

I also tried

Print Stops at next line unless front window!
Set Event Processing Off
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

just in case it was one of my other event handlers screwing things up,
but same
symptoms.

Dave



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



RE: MI-L Mapbasic code won't execute unless MI has focus

2004-10-19 Thread Warren Vick, Europa Technologies Ltd.
Hello David,

For as long as I can remember, MapInfo Pro has suffered from ADD, Attention
Deficit Disorder. When progress bars are enabled (which is the default),
Pro needs window focus in order for it to proceed otherwise you get a
blinking application on your task bar. This happens on any operations that
brings up the progress bar. As Uffe stated, if the program is your own, you
can switch off the progress bars, otherwise you just have to leave the
application in focus or programmatically self-focus which would be very ugly
for the user. I would guess (although I cannot say for sure) that this
problem will go away in Pro v8.0 under the .NET framework.

The ADD problem means that Pro is not great for batch processing and you
cannot really do other things on a machine while a job is running, even if
your machine has the capacity to do so. Personally, I'm surprised that this
is not a condition of Windows application certification.

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

-Original Message-
From: David Baker [mailto:[EMAIL PROTECTED] 
Sent: 19 October 2004 10:13
To: [EMAIL PROTECTED]
Subject: MI-L Mapbasic code won't execute unless MI has focus


I have a strange one here!

Running MI 4.5 under Windows XP home (but same problem occurs on another PC 
running Win98SE).

I have some code in the RemoteMsgHandler subroutine:

Print Stops at next line unless front window!
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

If I run the MBX it so MI is not the front window (by having Calculator on
top so I can still 
see the MI message window), and some remote data comes in, the first Print
line 
executes, but the 2nd print line doesn't, so it is getting stuck on the
Commit Table 
Vessels line.
The MapInfo icon in the task bar flashes orange but that is all that
happens. As soon as 
I click on the flashing icon to bring MI to the front, the code continues to
execute - the 
table is committed  the 2nd print statement executes.

Anyone know what is causing this hanging?

I also tried

Print Stops at next line unless front window!
Set Event Processing Off
Commit Table Vessels
Print Commit Table Vessels doesn't execute unless front window!

just in case it was one of my other event handlers screwing things up, but
same 
symptoms.

Dave

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




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



RE: MI-L MapBasic - Open Folder Dialog

2004-09-23 Thread Nielsen, Erik R
Mike,
There's a method in MapBasic, but it's as clunky as h3££.

Here's an example:

Sub Settings
 Print Chr$(12)
 Print Settings
 Dialog 
   Title NetEditor Settings 
   Control Button
 Title Set Styles..
 Calling ColorSettings
   Control StaticText
 Title Select the output directory
   Control Button
 Title Browse..
 Calling DirHandler
   Control StaticText
 Title gsDefaultPath
 ID 1
   Control Button
 Title Save Settings
 Calling WriteIni
   Control CancelButton
 Title Default Settings
 Calling DefaultSettings
   Control OKButton
End Sub


Sub DirHandler
  gsDefaultPath = PathToDirectory$(
FileSaveAsDlg(gsDefaultPath,This.Dir,*,Select a directory and click
Save!))
  Print gsDefaultPath
  if gsDefaultPath =  Then 
Note You must specify a directory
  Else
Alter Control 1
  Title gsDefaultPath
Alter Control 1
  Hide
Alter Control 1
  Show
  End if
End Sub

I didn't post this as I didn't see you were from Atkins and I didn't want to
expose how shoddy I work.
Cheers
Erik



-Original Message-
From: Mike Tonge [mailto:[EMAIL PROTECTED] 
Sent: 22 September 2004 14:16
To: [EMAIL PROTECTED]
Subject: MI-L MapBasic - Open Folder Dialog


Is there any way to select a folder in the same way as the fileopendlg
function works.  ie.  Without having to code a seperate dialog window.
 
Mike Tonge
Atkins


-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  

This message has been scanned for viruses by MailControl - (see
http://bluepages.wsatkins.co.uk/?4318150)


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.



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



  1   2   3   >