MI RE: Import excel

1999-12-09 Thread Susan Yu

Just so that you're not alone, I've had the same experience with MI 5.0.
Fortunately, though, my Excel data wasn't very large and I was able to add a
space character to all the "word" data.  I did notice that it didn't affect
my numerical data (which was far more important).  I'm sorry to say that I
don't really have a solution except to put in a space character

sincerely,
Susan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Patrick van der Deijl
Sent: Thursday, December 09, 1999 5:13 AM
To: 'MAPINFO-L'
Subject: MI: Import excel


Hello all,

I've a excel table which loses its last character in a characterfield
when imported in MI 5.0
No matter if the placename is short or long, the last character is
lost.
However, in MI 4.5 and 5.5 this problem does not occur.

Who has experienced this strange phenomenon before and, better, has a
solution. Of course you can export excel into dbase but this kind of
detours are not a solution. And why does it works fine in MI 4.5 and
5.5?

Thanks,

Patrick van der Deijl

--
Geodan IT bv
Jan Luijkenstraat 10
1071 CM  Amsterdam
The Netherlands
Tel. +31 (0)20-5707300
Fax. +31 (0)20-5707333

Also visit our website: www.geodan.nl

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



MI MapBasic Shade statement - Responses (Thanks!)

1999-10-01 Thread Susan Yu

Hello!

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

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

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

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

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

   Run Command "Shade 2 With New_Dealer Values" + name_list 

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

Here are the 2 responses I got:

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

--- From Brad ---

I worked with strings and the run command statement

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

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

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

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

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

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

exemple:

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

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

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

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


Thanks... 

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



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

1999-10-01 Thread Susan Yu

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

With sincere apologies,
Susan

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


Hello!

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

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

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

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

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

   Run Command "Shade 2 With New_Dealer Values" + name_list 

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

Here are the 2 responses I got:

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

--- From Brad ---

I worked with strings and the run command statement

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

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

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

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

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

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

exemple:

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

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

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

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


Thanks... 

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



MI MapBasic Shade statement

1999-09-30 Thread Susan Yu

Hello everyone,

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

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

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

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

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

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

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

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

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

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

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

Thanks,
Susan


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



MI FW: MapBasic Shade statement

1999-09-30 Thread Susan Yu

Hello, 
If my last message ever gets posted, I would just like to update that I have
figured out my problem by using the 'Run Command'.  It works fine...  But I
still have problems trying to alter the default shading to black and white
'brush' patterns instead of shading the polygons with colours.  Does anyone
know how to do this?

Thanks,
Susan

  -Original Message-
 From: Yu, Susan  
 Sent: Thursday, September 30, 1999 10:32 AM
 To:   '[EMAIL PROTECTED]'
 Subject:  MapBasic Shade statement
 
 Hello everyone,
 
 I was wondering if anyone can help me with a Map Basic problem I am
 having.  I'm trying to automate a thematic map using the "Region,
 individual values, black and white" template.  This map is suppose to
 result from values extracted from a selection performed prior.
 
[Yu, Susan]  clipped 
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]