Questions tagged [mapbasic]

MapBasic is a programming language for the creation of additional tools and functionality for MapInfo Pro Desktop GIS

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Automatically updating a table column with the name of table

Does anyone know a straightforward way in MapBasic to automatically update a table column with the name of the table the column exists in? Going from the MapBasic reference guide it seems the ...
1
vote
1answer
107 views

Request to run MapBasic 10.5 code in MapBasic 9.1 version

I have created MapBasic code using 10.5 version. Now I have to run in a lower version (9.1). Please anyone help me how to do this... How to copy paste the program code from 10.5 version to 9.1 ...
1
vote
1answer
648 views

Modifying tables based on title (MapInfo)

I have a query regarding the Mapbasic feature of MapInfo, I want to change the line style of an item depending on name (e.g if the .tab name contains the world group). I think I can work this out with ...
1
vote
3answers
3k views

Different in distance measurements in MapBasic/MapInfo

I am trying to make a custom ToolButton but I am having some problems getting correct measurements. I have drawn a line (using the normal line tool) and set its length to 1000m. (Double-clicking it ...
1
vote
1answer
357 views

What is the sequence of select query execution in Mapinfo?

I have confusion with the following query: Query 1: Select * from TABLE where vendor = "vendor1" OR "vendor2" OR "vendor3" ...
1
vote
1answer
2k views

Finding the type of object in MapBasic (MapInfo)

I am trying to write a MapBasic function to check whether or not an object can be used with the Overlap/AreaOverlap functions - I need to tell whether it's a closed shape or a line/arc/point/text ...
1
vote
1answer
60 views

Creating hotlinks only on objects that have value using MapBasic?

In mapbasic I am creating hotlinks with the code below. However when there is no value in the column it creates a hyperlink that doesn't work and this is frustrating for users. Is it possible to only ...
1
vote
1answer
125 views

How to classify points in mapinfo table into their enclosing polygons (non overlapping polys) in one run

The objective is to classify a group of points to its enclosing polygons in one run rather than using select for each polygon and do it on one by one basis (for 100,000 point and 5000 polygons it can ...
1
vote
1answer
301 views

Using FnodeTnode Tracing Extension in MapInfo?

I have downloaded FnodeTnode Tracer plugin from Pitney Bowes plugins repository website. It was just the MBX file that I have to regester it into my MIPRO and did it. I have water distribution ...
1
vote
1answer
213 views

MapBasic: skip popup menu dialog to get access to standard “Modify table structure” dialog

I'm trying to develop a small program using MapBasic for MapInfo. I want to get access to the standard "Modify table structure" (or "Image registration" for raster tables) dialog through "Layer ...
1
vote
1answer
168 views

One liner to change table style in mapbasic

Is there a one liner using Set Style to change all the symbology of one tab file? I want it to be Global Pen (1,2,0) Global Brush (1,16777215,16777215) There's https://groups.google.com/forum/#!...
1
vote
2answers
762 views

Finding values that are different between two tables in MapInfo/MapBasic based on a unique ID

I am comparing 2 tables which are mostly the same but there have been some amendments, in effect comparing a new version to the old one and displaying all the records with changes in a selection table ...
1
vote
1answer
189 views

Batch process RouteFinder tasks in MapInfo

I am running multiple network analysis processes in MapInfo using RouteFinder. Some of the datasets are large and the processes take a long time, so I would like to be able to set several to run ...
1
vote
1answer
4k views

Export MapInfo map to Google Earth (.kml file)

I have a map in MapInfo. I can convert it to Google Earth file (.kml) manually but I would like to do it automatically by commands in a function. Can anyone help me?
1
vote
1answer
152 views

Display all field of one record in mapbasic

I have a table with many columns, one of that is lon/lat. After I draw all points on a map, I want to display all other columns contents if I right click on a specific point. (It looks like to change ...
1
vote
1answer
759 views

How to erase outside in MapBasic?

i want to ask about erase outside in MapBasic. I have two table : sensus and voronoi And I want to erase the overlap areas. How can I do it? This is my syntax Select overlap(sensus.Obj,voronoi.Obj) ...
1
vote
1answer
904 views

How do I get value from edittext or text field in MapBasic

I have created a dialog menu in MapBasic which user can enter value in text field. I am a newbie in MapBasic Programming. My question is how to select data from database using text field value? ...
1
vote
1answer
125 views

Query Sql Error

I want to join these 5 tables with MapBasic, because i want to use in statistic : Select * From Malade, Maladie, Ilot, Etat_Ilot, Pauvreté Where Malade.Maladie = Maladie.ID_maladie ...
1
vote
2answers
188 views

Send mail with MapBasic

How can i send mail with MapBasic?? I have already tried this code, but it's not working i used SenMail Application sub send dim cmdstr, subj, msg as string subj = "Hello from MapInfo-L" ' is the ...
1
vote
1answer
324 views

MapInfo / Mapbasic: simple compile of table from six source tables

I have a project which I am reviving after a gap of some years. It involves several hundred runs within MapInfo, scripted in MapBasic. I am stuck at a point that is so simple, it's driving me nuts. ...
1
vote
1answer
809 views

Transform coordinates in MapInfo with GSB data

Does anybody know if MapInfo (or MapBasic) is capable to do coordinate transformation using the NTv2 (National Transformation version 2) method? Currently Switzerland changes their national ...
1
vote
1answer
326 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 Files\Mapinfo\Professional\Mapinfow....
1
vote
1answer
1k 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 ...
1
vote
2answers
306 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 ...
1
vote
1answer
509 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
1answer
142 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
658 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
578 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 edited/...
1
vote
1answer
915 views

Deleting duplicates from multiple tables

Using the delete duplicates tool is there a way in Mapbasic to have it run through a large number of tables, or do you have to manually select each table and run the tool? Cheers, Jon
1
vote
2answers
775 views

Question about the TableInfo function in MapBasic

I have a problem I really can't seem to get my head around, MapInfo crashes when I try to run and if statement. I have pretty much exactly the same code in another sub to check for other things and ...
1
vote
1answer
99 views

Question about subs in MapBasic

For some reason my sub isn't 'linking' in MapBasic, I'm pretty new to this, but why is the sub assuming it begins on line 110 rather than where it actually says sub?
1
vote
1answer
1k views

MapBasic Create Circle Round a Point

I've been tasked with creating a simple MapBasic plug-in that will loop through a table in MapInfo, zoom to the location of each point, create a circle to highlight the point, and convert the map to ...
1
vote
1answer
2k views

Find spatially identical records in Mapinfo

Is there a tool/mbx similar to the Arc INFO "Find Identical" to find records which have exactly the same shape?
1
vote
1answer
264 views

How to update a Mapinfo layer at certain time intervalls?

I have point which represents stress signal. The signal changes at certain time. How do I implement this in mapinfo ? I did this using time() function and increment it to certain seconds but whole ...
1
vote
1answer
478 views

Is it possible to find if a value is present in Array without looping in mapbasic?

How to find a value is present in array without looping ? e.g. For i=1 TO ubount(Array) Find if value is present Next or some more direct statement like Array.contains(somevalue) like in java
1
vote
1answer
250 views

Is toggle button's state stored in some property in Mapinfo?

Well can we retrieve On or OFF state of toggle button. Do we have any property of toggle button that can be read from toggle button that is ON or OFF?
1
vote
1answer
461 views

Adding text as ICON in mapinfo in mapinfo buttons

It's a question with yes or no answer and if yes How? Is it possible to add text label as icon in mapinfo buttons. Instead of : Create buttonpad "sitestatusbutton" As ToggleButton ID 1011 ...
1
vote
1answer
751 views

Making a Button in mapinfo with conditional function

I have following code : Sub create_ButtonFromVendor Dim i As Integer i=1 Create ButtonPad "allVendor" As ToggleButton Icon MI_ICON_ZOOM_QUESTION Calling ...
1
vote
1answer
700 views

How to handle line data in Mapinfo?

I have laoded my lines data in MS-SQL in one table. I have points data in DBMS as well in separate table . When I open both table the map window would show lines and points as I want but now when I ...
1
vote
1answer
4k views

How to connect mapinfo 10 with bing map or other mapping service?

Is there way to connect mapinfo with bing or google map. I have done this with mapinfo 10.5 but could not find it with mapinfo 10.
1
vote
0answers
48 views

Converting MapInfo to interactive layered PDF to access the full map?

I want to convert the full map I have in Pathloss 5.0/MapInfo 9.5.1 format into PDF so that I can access the whole map in a PDF file. If I zoom in, the PDF file will be zoomed into the smallest ...
1
vote
0answers
70 views

MapInfo and Mapbasic [closed]

I'm looking to run an automation using MapInfo and Mapbasic. What I want to achieve is to run through a MapInfo table on a row by row basis producing a map for each row within the table and then ...
1
vote
0answers
105 views

MapBasic: expression does not evaluate to a column or table name

I want to create a new table using MapBasic to fill it later with log events. Those log will go in a new table created each year. Here is my code (error occurs on row with Create Table): ' --- Log ...
1
vote
0answers
124 views

Get username info from active connection in Mapbasic [closed]

I'm trying to retrieve information on username from active connection (SQL Server Express) in MapInfo 11.5 32bit. First I tried using Server_ConnectInfo( ConnectionNo, SRV_CONNECT_INFO_SQL_USER_ID ) ...
1
vote
0answers
83 views

HttpPOST and MapBasic

Can anyone provide an example of how one would use the (pre-defined) function Function HttpPost( ByVal strURL As String , ByVal strHeaders As String , ByVal ...
1
vote
0answers
139 views

How to build Geometric network in MapInfo?

I have sample dataset of Water network. I wanted to make it geometrically connected network. I was trying to trace the network end to end, I have used "FnodeTnode tracing" plugin, but I was not lucky ...
1
vote
0answers
170 views

Avoiding divide by zero in MapBasic?

In select statement how to avoid divide by zero in MapBasic: select (col1/col2) "result" If col2 is 0 it returns null. How to use ISNULL or something in mapbasic?
1
vote
1answer
393 views

Popup menu writing value from array

I have successfully created a custom dialog box which uses an array to read in a list of developer names from a table, and populates the selected record based on the row number pulled in from the ...
1
vote
0answers
191 views

Changing object/point to custom symbol based on specific name in MapInfo using MapBasic? [closed]

I am new 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 and would like to do. For this ...
1
vote
0answers
65 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