Create Map statement is failing

21 views
Skip to first unread message

Five Thumbs

unread,
Dec 2, 2021, 9:27:17 PM12/2/21
to MapInfo-L
I am struggling to find the problem with the following code.  The program was originally created using MI 11 and runs without an error.  I am now running the code on the newest version and it fails on the Create Map statement.  The error indicates that the file I am trying to make mappable (ShortRoads_Agg100)  is not open.  However, when I check to see what tables are open, the file in question is there.   Any help would be appreciated.

 Create Table ShortRoads_Agg100 (AggCount Integer ) File FP_Wrking + "\ShortRoads_Agg100.TAB" Type Native Charset "WindowsLatin1"

Create Map for ShortRoads_Agg100    CoordSys Earth Projection 3, 62, "m", -96, 23, 20, 60, 0, 0 Bounds (-89717066.7319, -80920710.9208) (89717066.7319, 98513422.543)

Cheers!

James Harvie

Peter Horsbøll Møller

unread,
Dec 3, 2021, 3:32:13 AM12/3/21
to mapi...@googlegroups.com

I doubt the problem is to be found in those few lines of code.

I created a small MapBasic tool like this and ran it and it worked:

 

Dim FP_Wrking As String

 

FP_Wrking = "D:\1. Support"

 

Create Table ShortRoads_Agg100

     (AggCount Integer )

     File FP_Wrking + "\ShortRoads_Agg100.TAB"

     Type Native Charset "WindowsLatin1"

 

Create Map for ShortRoads_Agg100

     CoordSys Earth Projection 3, 62, "m", -96, 23, 20, 60, 0, 0 Bounds (-89717066.7319, -80920710.9208) (89717066.7319, 98513422.543)

 

Can you make this small tool work too?

You will have to change the path.

 

Peter Horsbøll Møller

www.precisely.com

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

From: mapi...@googlegroups.com <mapi...@googlegroups.com> On Behalf Of Five Thumbs
Sent: 3. december 2021 03:27
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Create Map statement is failing

 

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

 

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/f3465146-d1fa-4d2d-9f5d-06dd8044d8f6n%40googlegroups.com.

Five Thumbs

unread,
Dec 4, 2021, 2:48:40 PM12/4/21
to MapInfo-L
I discovered that if I simply re-type the line of code it then runs without a problem.  I think the problem was, I transferred the code between two devices using email.  There must be some hidden formatting, I think removed spaces, that were not detectable to the naked eye.  The program failed in a small number of other locations and re-typing the code fixed it.  Very strange, but true.

James Harvie

Peter Horsbøll Møller

unread,
Dec 4, 2021, 2:52:30 PM12/4/21
to mapi...@googlegroups.com
Quotes are a typical cause of such issues
Good you got it working 

Peter Horsbøll Møller
Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 


Den 4. dec. 2021 kl. 20.48 skrev Five Thumbs <5thumbsonc...@gmail.com>:


Reply all
Reply to author
Forward
0 new messages