RE: MI MB: VB6 DLL Access from MB

2000-09-12 Thread PEM




Hi,

Creating DLL and using them from MB is a big wish from many MB developers.

Unfortunately, as Richard writes, VB created COM DLLs that can't be used
from MB.
But there is a tool made by Desaware that might do the trick anyway. The
tools is
called SpyWorks and it creates a alias DLL that can retrieve the addresses
for the
wanted functions in the VB DLL.

I have tried it in a simple way and I have got a hole through to a VB DLL,
but only
with a simple function, nothing fancy as large use defines dialogs, but
this ought
to be possible as well.

Is there anyone else out there who has good experience with this tool ?

Best regards,

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



Re: MI Crystal Report

2000-09-08 Thread PEM




Hi,

Sure it's possible to run a Crystal Report from within MapBasic.
Here is the syntax:

'*
Open Report reportfilespec
reportfilespec  is a full path and filename for an existing report file.
'*

But now that we are discussing Crystal Report. Does anyone have any
experience with the Crystal Report API interface from within MapBasic.

I've done some programming through this API interface, but there seems
to be a problem when I want to start the Crystal Report Viewer. I have no
problems in printing an existing report to the default printer.

Any good ideas ??!!

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



MI Papersize definitions...

2000-08-04 Thread PEM




Hi,

Is there anyone out there who has a complete list for the Papersize
definitions
for use in MapBasic 6.0.

I know MapBasic comes with a Papersize.def, but the papersize definitions
for
A1 and A0 are missing as far as I can see.

As far as I have figured out the values for A0 and A1 can change from
printer to printer.
I tried a HP650: A0 - 268, A1 - 267.
and a HP2500: A0 - 270, A0 - 269

If anyone knows of a set of values that a recognized by all printers, I
sure would
appriciate these.

Best regards,

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



Re: MI SQL Select full jolin

2000-08-03 Thread PEM




Hi John,

I haven't excactly tried it myself, but this ought to do the the job:

1. This SQL query requires that both of your tables has a Integer column.
Lets call it OUTJOIN
All the values in these two column should be the same, for instance 1.

2. Your SQL syntax would then be (I guess you allready have seen it):

Select * From Table1, Table2
 Where Table1.OUTJOIN = Table2.OUTJOIN
 Into FULLJOIN NoSelect

This query ought to give you a table with as many records as the product of
the two input tables.
It will match each of the records in Table1 with all the records in Table2.

Good luck!

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



Re: MI MB Select using string variable

2000-07-26 Thread PEM




Hi Bill,

Try this syntax instead:

I take it that Population and MyTable is the real names for the table and
the column
and not variables/constants containing the real names.
***
*
Dim  MySQL as String

'1. If Population contains numbers:
MySQL = "Population  1"

'2. If Population contains strings:
MySQL = "Population  " + Chr$(34) + "1" + Chr$(34)

If MyTable is the actual name of the table:
Run Command "Select * from MyTable Where " + MySQL
***
*

Hope this will help you on!

Best regards,

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



Re: MI Run command and object variable - more details

2000-07-21 Thread PEM




Hi Serge,

The problem is that the object variables are converted into text in your
Run Command
Statement. And when you convert an object variable to text, you get the
type of object
the variable contains/is pointing at.
This also explains the error you are getting : "Variable og field Region
not defined.

The way I would solve this problem is by inserting your objects into a new
table and then
create the SQL statement using this table.

Like this:

***
*
Dim i As Integer

'**Create a new table for the objects...
Create Table OBJECT_SQL
 (
 ID   Integer
 )
 File TempFileName$("")
'**Let's make the table mappable...
Create Map For OBJECT_SQL
 CoordSys Table gsGridUnderN

'**Inserting your first object...
Insert Into OBJECT_SQL (OBJ) Values (goCelluleModifiee)

'**Inserting all the objects in your array...
For i = 1 To Ubound(goCelluleFille)
 Insert Into OBJECT_SQL (OBJ) Values (goCelluleFille(i))
Next

'**Make the selection into FUSION
Select * From gsGridUnderN
 Where OBJ Contains Any (Select OBJ From OBJECT_SQL)
 Into Fusion

'**Do the rest of yor work with this table


'***Clean up the temp table:
Drop Table OBJECT_SQL
***
*

I hope this helps you !

Best regards,

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


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



MI Problem with printing on HP8000

2000-07-21 Thread PEM




Hi There,

I was wondering if there is anyone out there who has the same problem with
the HP8000
printer when printing from MapInfo.

Appearently this printer works most of the time. But in certain cases it
just reports "Out of
memory..."

As far as I have figured out so far there seems to be a special problem
with some labels
written with a special Font (in this case Arial).

The printfile is as big as 1.06 MB, which not should be a problem.
If I try printing the same area with some other labels the printfile only
has a size around 0.5 MB.

There doesn't seem to be any problems printing large raster maps.

Any ideas would be appriciated!

Best regards,

Peter
***
*
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
KampsaxVoice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
MapInfo Authorized Partner
***
*


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



Re: MI Re: I lost my .TAB ... ARGH!!!

2000-06-16 Thread PEM




Hi,

It's an even smaller problem than describes by Uffe.

In MapInfo:
File Open Table...

Select FiletypesDBF
In the Filename enter *.dat og hit Enter
Go to the directory where your *.dat file without the Tab file is found.
Select the *.dat file and voila...

MapInfo automatically created the *.tab file and next time you just
select this one.

Good luck!

Peter
Kampsax, Denmark
---
---
Hello John

This may not be such a big problem:

1) Delete any index'es (*.IND)

2) Rename *.DAT to *.DBF

3) Open the DBF's with a DBF-viewer (see http://www.legendsoft.com/, look
for freeware edition)

4) Now inspect the field types and create your TAB-file manually
DBF doesn't support the same field types as mapinfo, so you will have to do
a little guessing:
Character fields: C, any size
Integer: C, size 4
Small integer: C, size 2
Float: C, size 8
Date: C, size 4
Decimal: N
Logical: L

5) Rename *.DBF to *.DAT


Regards
Uffe Kousgaard


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



Re: MI Tables

2000-04-18 Thread PEM




Hi Tony and others,

I've created such a function to test whether a table is open or not and it
goes
like this:

'--
'Is table szTab open ? function
'--
Function TableOpen(ByVal szTab As String) As Logical

Dim i As Integer

TableOpen = False

OnError GoTo NoSuchTable

 '**Need to check if the table asked for is the current Selection...
 If szTab = "Selection" Then
  If SelectionInfo(SEL_INFO_NROWS) = 0 Then
   Exit Function
  End If
 End If

 i = TableInfo(szTab,TAB_INFO_NUM)

 '*** Success, the table was open...
 TableOpen = TRUE

OnError GoTo 0

Exit Function

'-
NoSuchTable:
'***The table isn't open, an error occured ...

End Function

This has worked so far for me !

Best regards,

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


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



Re: MI MapBasic PointInPolygon predicate function

2000-04-07 Thread PEM




Hi David,

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

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

***
**
Dim  oPoint, oRegion As Object

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

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

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

Best regards,

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


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



MI Re: Rotate Layout Window

2000-04-03 Thread PEM




Hi Sheila,

Maybe I have misunderstood your problem, but why don't you just
use A4 Portrait layout with 2 pages ?

In this way you don't need to rotate the things on your layout. The two
A4 pages will be on top on each other, if you just tilt your head a bit to
the left ; )

I hope this helps!

Best regards,

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


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



Re: MI Determining if a table is open in MB

2000-03-06 Thread PEM




Hi Tim,

The easiest way to determine whether or not a table is open, is as you
mention
your self to use the TableInfo() function, which will give an error if the
table isn't open.

And because this question might be asked over and over again, I would say
that the
best thing to do is to put this question inside a function that returns
TRUE if the table is
open and FALSE if not.

This means that you can use this function in the same way yhat you use
FileExists().

Here is that function:

'**
**
'Is table szTab open
'**
**
Function TableOpen(ByVal szTab As String) As Logical

Dim i As Integer

TableOpen = False

OnError GoTo NoSuchTable

 '***If you are asking for the Selection table, this question is
nessessary...
 If szTab = "Selection" Then
  If SelectionInfo(SEL_INFO_NROWS) = 0 Then
   Exit Function
  End If
 End If

 '*** If the table isn't open, an error will occure...
 i = TableInfo(szTab,TAB_INFO_NUM)
 '*** The table is open...
 TableOpen = TRUE

 OnError GoTo 0

 Exit Function

'-
NoSuchTable:
 '***The table is NOT open...

End Function
'**
**


I hope this will help you on with your project !

Best regards,

Peter

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


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



MI Using Crystal Peport from MapBasic

2000-02-17 Thread PEM




Hi,

I was wondering if there is anybody out there who has had good result with
calling the Crystal Report API functions from within MapBasic.

I'm strugling quite a bit with these function and most of my work is doing
OK,
the only problem I'm still having is that I can't seem to be able of
getting the
Crystal Report PreView window to appear. Printing the reports directly to
the
Windows Default Printer works OK.

Any ideas or suggestions would be appriciated.

I'm aware of the function Open Report in MapBasic 5.5, but this command
only works
if the application is running on a MapInfo Pro. The MapInfo Runtime doesn't
include
the Crystal Report!

TIA

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


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



Re: MI Calculating Volumes

1999-12-27 Thread PEM




Hi Nick,

The calculation of volumens can be done in VM !

Do the following:
1. Create the grid with all your height data
2. Create another grid that covers the same area as the previos. This
grid's values should be
Z-value where you want the surface to be. Groundlevel or watersurface...
3. Now you'll have to calculate the diffence between these two grid, use
the grid calculator.
4. Allmost last thing. Draw a area that show the area you would like to
have the volumen calculated for.
5. VM has some tools where you can get updated columns with some values
from the grid. One of these
should give you the possibility to update with the volumen.

I hope this helps you further even thought my desciption is a bit
'inaccuracy'. My VM was removed from
my computer when I uninstalled a older version of MapInfo.

Happe new year to you all !

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


Nick wrote:
I don't know if this question has been raised recently (I think it has in
the past...?) but does anyone know a MI based app that can calculate
volumes.  I.e. from X,Y and Z data - the way you think Vertical Mapper
could but doesn't.  A client has VM but wants volume calculations without
involving an export to a CAD system.

Any ideas??

Happy Xmas and Merry Millennium

Nick Hall


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



Re: MI Create Text in a Layout

1999-12-23 Thread PEM




Hi Scott,

If you are using MapBasic 4.5 or a later version there is a new function,
that does the trick.

Syntax:
CreateText( window_id , x , y , text , angle , anchor , offset )

This function creates text from a centerpoint and you can then set
different values to control
the placement of the textobject, almost like the Labelsetting.

That is you just need the calculate the center between your two points and
of you go.


Merry Christmas to you all.

Best wishes,

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


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



Re: MI Using the data in a String Variable

1999-12-17 Thread PEM




Hi Scott,

The command for solving your problem is :

Run Command LastView

I hope this helps you!

Best regards,

Peter

Peter Moller
[EMAIL PROTECTED]
Kampsax Geoplan, Denmark

**
Scott Wrote:

I have a string variable, (LastView), which contains the MB code to create
a
Layout window.

Is there a way to extract this data to use in a layout command?

I want to create a layout the same as the last one opened.


If WindowInfo(FrontWindow(),WIN_INFO_TYPE) = WIN_LAYOUT then
LastView = WindowInfo(FrontWindow(),WIN_INFO_CLONEWINDOW)
end if

Layout
LastView


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



Re: MI problem with clone view command

1999-12-08 Thread PEM




Hi,

The Clon View work by creating a command string containing all information
about the map, e.g. zooms, labels, etc. But this string that should contain
all
these information isn't allways large enough. The string is limited to 32K
characters, well this the was the case a year ago and they promised me to
look
into the problem, but I don't know if it has been fixed.

A way around it is to use workspaces: Save the current setting to a
workspace
and open this workspace, et voila: You have now copied not only the active
mapwindow, but all your windows. Just close the ones you don't need.

***
**
Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
Kampsax Geoplan Voice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense CWeb: www.mapinfo.dk
DenmarkMapInfo Authorized Partner
***
**
Jory wrote:
 I have been having a problem using one of the most basic functions of
 MapInfo: Clone view.

 When I use clone view, the newly cloned view does not keep the same layer
 values that were in the original. I might have this layer or that on and
 viewable at a certain level and the new view might have all layers on and
 all layers labeled.


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



MI wacked out line length calculations

1999-11-17 Thread PEM




Hi Ben,

I guess you problem here might be the fact that some ( or rather a lot ) of
your records have been selected more than once, and therefore the entire
length
of all the lines will double, triple or more.

Try the following:
Select LineName, sphericalobjectlen(t_name.obj, "mi")  From MyLineTab
Where obj Intersects any (Select obj from MyRegionTab
   where Name = "TheRightName")
Group By LineName
Into MyNewSelection NoSelect


In this way every entry will only be shown ones. Of course the LineName
column
should be unique, eventually add a new column and update it with the RowID.

Do also have in mind that when you do a gruoping your obj is lost,
therefore you
have to select the Lenght information from the beginning.

I hope this helps

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

Ben Humphrey wrote:


Okay, here's something COMPLETELY messed up.

I am conducting some length calculations on some line data for the US
railroad network.  I did a select objects from the railroad table that
intersect another table of polygons.  I save that as a table.  I then do a
select sphericalobjectlen(t_name.obj, "mi") into sometable, calculate
statistics, and get a the sum, for each row in the original table selection
of line lengths.  If I do it that way, I get over 6000 miles (which is way
off if you just look at the selection in a map window.  If I combine all
line objects into one, and then double click on the single object, I get a
line length of only 1000, which seems much more reasonable.  Anybody have
this experience before or am I using the wrong mapinfo commands?

Thanks
Ben


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



Re: MI MB: can one control be made dependent on the output of another control in db

1999-08-12 Thread PEM




Hi Rajeev,

Listboxes do have a Calling clause that activates a handler, when a change
is mad to the

Here is the syntax for this control.

 Control  { ListBox  |  MultiListBox }
  [ Position  x , y ]   [ Width  w ]   [ Height  h ]
  [ ID  control_ID ]
  [ Calling  handler ]
  [ Title  { str_expr  |  From Variable  str_array_var }  ]
  [ Value  i_selected ]
  [ Into  i_variable ]
  [ Disable  ]   [ Hide ]

Best regards,

Peter

Peter Moller[EMAIL PROTECTED]
GIS-Developer   Direct: +45 6313 5008
Kampsax Geoplan Voice: +45 6313 5013
Rugaardsvej 55  Faximile: +45 6313 5090
DK 5000 Odense Cwww.mapinfo.dk
MapInfo Authorized Partner


*
Rajeev,

ListBoxes doesn't have Calling clause so you need user activity (to push
button, double click or so) to move selected items from one listbox to the
other.



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