MapBasic is a programming language for creation of additional tools and functionality for the MapInfo geographical information system.

learn more… | top users | synonyms

1
vote
2answers
41 views

Trying to completely Exit from the Mapinfo application?

I tried the following two things: include "mapbasic.def" Declare Sub Main Declare Sub Exit Sub Main() If WindowInfo(WIN_MAPBASIC, WIN_INFO_OPEN) then Close Window WIN_MAPBASIC ...
2
votes
1answer
83 views

MapBasic sentence to update column contained in an object table

I was looking for a MapBasic sentence to update a MapInfo table. I've got two tables and I want to update one of them (POINTS) with an attribute of another (REGIONS). I would like to update points ...
0
votes
3answers
67 views

How to create a stable user Interface in Mapbasic?

I am trying to have a user enter values via an interface and continue to run the program but the following line (Select...) fail to work most of the time as part of the program (although it works fine ...
2
votes
1answer
35 views

Expression does not evaluate to column or table name?

This is my code: Include "MAPBASIC.DEF" Include "MENU.DEF" Dim s_filename As String s_filename = FileOpenDlg("","","TAB"," Open Table Interactive") Browse * From s_filename I want to open a ...
0
votes
1answer
46 views

Accessibility to developer of “Alter” and similar constructs in MapInfo MapBasic

Parts of the MapInfo MapBasic API are accessed as follows: Alter ButtonPad "Main" Add ToolButton ID 101 Icon 8 Calling OnToolClicked HelpMsg ...
1
vote
0answers
25 views

Changing object/point to custom symbol based on a specific name in MapInfo, using MapBasic

First, I must clarify I am green when it comes to programming and Basic. I only started trying to use MapBasic and have reviewed a few sites and their reference guide to get an idea of what I can do ...
0
votes
1answer
32 views

How to pass a variable (FilesToAdd) from VBA script (interface) to a Mapbasic program?

Option Explicit Public FilesToAdd As Integer Private Sub TEST_Click() FilesToAdd = 1 Dim b As Variant Dim Prog As String Dim File As String Prog = "C:\Program ...
3
votes
1answer
66 views

What are some GIS outlets for my open source MapBasic utility module and library?

I'm actively developing a MapBasic module that provides additional MBX programming functionality by wrapping .NET 4.0 and Win32 API calls in easy to use MapBasic functions and subs. MB_Utils acts as ...
1
vote
1answer
39 views

Dialog Table Name Prompt Error In MapBasic_Mapbasic

I am trying to prompt the Table name from the opened tables and to use it in the rest of the program, but what i get is (Table (i) is not open) after clicking ok the Sub Procedure is below, please ...
1
vote
1answer
60 views

Run the Sub procedure by selecting an object from the map

In Mapbasic made custom menu selected item to run sub procedure, what i want to make the Sub procedure to be ready to run by selecting an object from the map and run again by selecting another ...
0
votes
1answer
45 views

error message: “Cannot split, erase or overlay with points, collection, Text or layout frame objects” in Mapbasic

In order to automate procedures using MapBasic, I wrote the code for overlapping two objects -- one a polygon object and the other a point object -- using Objects Intersect statement written below. ...
0
votes
2answers
46 views

mapbasic, create polygon, insert node

Hi I try to create a parsel table from coordinates. My scripts are below. Why it does not show the results on the map? Thank you in advance! Create Table "parsel" (Parsel_Adi Char(10)) file ...
0
votes
1answer
104 views

How to Create site cells sectors in MapBasic for over 1000 records

I am new to mapbasic and i need to learn to create the cells of a site in MapInfo using the Mapbasic if any one can help me thanks in advance i Used the bellow script i found in the Web, and it was ...
0
votes
1answer
159 views

How to write to Sql server from MapBasic and insert rows

I have created a table in Sql server 2014 with the columns: Id (int), Geom (geometry), RouteId (int), Desc (varchar(MAX)) I have succeeded in making the table mappable through MapInfo I have checked ...
0
votes
0answers
21 views

Is it possible to export MapJ object into TAB file in MapXtreme?

I am trying to open a TAB file having geometry information and bind/join it with JDBC Table having attribute information. Now I have to export the joined table along with map/geometry information from ...
0
votes
0answers
64 views

finding length of a custom type array in mapbasic

Hello I am just getting started with MapBasic and I have run in to some trouble trying to count the items in a custom type i have tried accomplishing this by running a loop until an error occur. ...
0
votes
1answer
80 views

How to create a array variable containing the values of another variable in a table?

I am new to mapbasic and would like to have an array variable (sac) in order to access it through the "For variable = 1 To n" function. I would like to create a loop that only takes on the value of a ...
0
votes
0answers
94 views

Check for extraneous bytes that appear before %PDF at the head of a MapInfo printed PDF file?

I am using a MapBasic program that automatically prints individual PDF maps of each polygon in my table. After getting an Adobe Reader XI update, the PDFs no longer open. I receive the following ...
0
votes
0answers
71 views

How to code for Thematic map in Mapbasic?

I would like to write code for creating a thematic map. The GUI command in Mapbasic window shows many lines in order to set up the different colours which will be used on the different polygons ...
1
vote
0answers
63 views

Unable to copy text out of MapInfo 12 info tool

As the title says, I'm currently unable to copy and paste information out of the info tool box. Is there a way that this can be done normally or do I need to write a new tool/ is there a tool out ...
0
votes
1answer
81 views

MapBasic For Loop ignoring every other row

I have made a loop in MapBasic but is it only updating every other row in the table: My code works from the bottom of the table upwards to generate start and end coordinates for polyline features: ...
0
votes
1answer
104 views

Creating points based on coordinates in MapBasic

I am currently working on a MapBasic tool that generates start and end coordinates for a polyline layer. So far I have successfully populated 4 columns in a table (SX, EX, SY, EX) with coordinates of ...
1
vote
1answer
30 views

Strange results

I am getting a strange error within GIS, when using the internal MapInfo Select query for objects. SELECT featurecode, area(obj,"sq km"),theme, DescriptiveGroup,count(*) from ...
0
votes
2answers
90 views

How to Unit test MapBasic Programs?

Is there unit test frameworks available for MapBasic? I've been searching, but have not found anything.
0
votes
0answers
38 views

Is there any way to get the call stack in Mapbasic?

Is there any (supported or unsupported) way of getting the call stack at a given point in a Mapbasic program?
2
votes
2answers
180 views

What is the difference between Sub and a Function in Mapbasic?

In MapBasic it seems like Functions can have side effects so I don't really see the difference between using the following: Declare Sub MyProcedure (myParameter As String) and then use myParameter ...
0
votes
1answer
97 views

In mapbasic,how to register a table in xlsx,not in xls?

I have tow files that only differ in extention name, one xls ,the other xlsx.both contained the same things,same structure.there's no problem when I registered a table in xls,but when in xlsx,an ...
2
votes
1answer
186 views

How to set ODBC connection in MapBasic

i am trying to set code for ODBC connection in Mapbasic. Instead of using Username and password i wanted to set code for Window authentication.my sample code is Register table "tablename" Type ODBC ...
0
votes
3answers
234 views

How to set code for designer legend in mapbasic

last couple of days i am doing work on thematic maps using mapbasic. I am getting error while set the legend code. it giving me unrecognized command or code kind of error ... my code is Create ...
0
votes
0answers
142 views

How to set Window id in Mapbasic?

Last couple of days i am working with creating thematic map using MapBasic. I am facing some difficulties while doing scripting and compilation.i am getting error due to Dynamic Window Id. does any ...
0
votes
1answer
150 views

How to write code for page setup in Mapbasic

I am very new to mapbasic scripting. i am creating thematic map using mapbaic code. For that i am searching code for Page setup to set my map as landscape with A4 size. But i didn't found any code for ...
0
votes
0answers
42 views

Google Time slider - Recreated in MapInfo

Would it be possible to re-create the Google Earth Time Slider function with MapInfo? I assume through the use of MapBasic?
1
vote
1answer
94 views

Handler tool in MapBasic

Have any handler or procedure, that call automatic when the click or unclick menu item or button? Similiar SelChangedHandler.
1
vote
0answers
40 views

Check Text Mode when Typing text MapInfo

I'm writing a code MapBasic How do I know text mode when I add text to Map. Can help me!, check cursor texting mode
0
votes
1answer
132 views

Pack table option in MapBasic

I write a code pack all table in Map Window, after pack all table, some tables are removed from map window, How do I known which table is pack, and open table to map window in the order as original ...
1
vote
1answer
71 views

How to make a shortest path code in mapbasic?

I have a column table that consist of 2 points (from / to), i wanted to have a dialog box that will show all possible path from source to destination from a list box and show the shortest path with ...
1
vote
1answer
59 views

How can I make a dialog box floating while working on the window?

I would like to have a floating dialog box just like the Named Views.mbx How could make my existing dialog box float while working on other window? Thanks!
1
vote
1answer
129 views

How to select all unique values in a column and put it in multilist box?

I wanted to collect all unique values in a column and show it in multilist box.
1
vote
1answer
130 views

What arguments does MapBasic's ColumnInfo() take?

MapBasic's tableInfo() function has a KnowledgeBase docs page here listing the arguments and all the attributes it takes, and a usage example in the reference document. columnInfo() has neither of ...
1
vote
1answer
735 views

How to loop through all columns in a table/layer getting all data for a row/feature in MapBasic?

I'm trying to extend this GNU-licensed plugin MI2SVG, which converts MapInfo maps to SVG, so that it writes associated table data into the SVG it creates, so that browser based JS web applications can ...
2
votes
0answers
58 views

String Size/Query in Mapbasic

I want to select many objects on the screen and select other objects that share the same attributes with the chosen group. So I'm creating a tool to select many object based in five tables' columns ...
4
votes
2answers
311 views

How do I snip/split polylines at chainages?

What is the best way to snip/split lines at chainages? E.g I have a csv with the uniq ID of the polyline item and a start and end chainage. I want to extract the lines between the chainages stated. ...
0
votes
1answer
226 views

How do I automatically print individual regions from a MapInfo table to a PDF without interactively selecting and printing each one?

I need to automatically print individual polygons that make up a table. I need them to be a close-up view of the polygon and print to a PDF file. It is very time consuming to print each one ...
1
vote
1answer
161 views

Mapinfo SQL Query for compare for edited data in tables

I have a table that contain several columns, each has their own data. then, someone have made some change in the data (just a little one data editing). how do i know later what data have been ...
0
votes
1answer
335 views

How to work with tables in MapBasic?

I try to get data from table use MapBasic: Dim nCol = "ColumnName" Fetch First From Untitled Do While Not EOT(Untitled) colValue = Selection.nCol Note colValue Fetch Next From Untitled Loop ...
0
votes
1answer
177 views

Updating a column with line direction in MapInfo

I was wondering if there is a way to update a column in MapInfo with the digitised line direction. I have two TAB files, one is complete lines and the other is sections of the same lines (both have a ...
0
votes
1answer
165 views

In MapBasic, how do I allow a user to choose a folder?

I have used the FileOpenDlg() function to allow the user to choose a file. I would like to do the same thing to allow them to choose a folder so I can save files to the folder without the user having ...
0
votes
1answer
110 views

MapBasic | Objects Combine

Can anybody tell me how I can combine the geo objects of one relation to one single object? I reckon the Object Combine function is right one, but I have no idea how to specify the code... Thanks, ...
0
votes
1answer
207 views

In MapBasic, how do I register a table in XLS format that has a different range from one execution to another?

I need my application to be able to register an XLS table that does not have a set range. One time it may be A2:AL10000, the next it may be A2:AL2000, etc. I have not seen this anywhere in the ...
0
votes
1answer
257 views

Map Basic. Where-clause in Select Statement

what is wrong with this statement? I recon the where-clause is the problem. Select * from "BEDIRECT_POT_" + vo_num, PLZ5_2012_bereinigt where "BEDIRECT_POT_" + vo_num.PLZ like ...