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

learn more… | top users | synonyms

0
votes
0answers
8 views

Dynamically adding controls onto MapBasic dialog?

I have seen a lot examples with dialog creation, like: Dialog Title "Title" Width 198 Height 52 Control Button Title "Обзор" Width 50 Height 15 Position 133, 6 ...
3
votes
2answers
21 views

MapBasic Dialog Preserve command error: No active Dialog

I've hit an issue with using the Dialog Preserve command. I get the error message "Invalid Dialog preserve command. There is no active dialog". As far as I can tell I've followed the guidance provided ...
1
vote
1answer
269 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
60 views

How can i add style to Mapinfo table?

I used Mapbasic to create tables. I create only table's structure without any objects inside. How i want make styles for tables. I tried something like: Dim b1 As Brush, p1 As Pen b1 = Makebrush (1, ...
0
votes
1answer
347 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 (i....
1
vote
2answers
618 views

Split polyline where it intersects with other lines in MapInfo

I have a polyline (bus route) which I want to split where it intersects with other lines (not polylines) I have created. I'm happy to initially do it manually to see how it works, although I would ...
1
vote
2answers
189 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
0answers
9 views

Error while using methods in mapbasic

I am using a .dll file methods in mapbasic, but it shows error- declare method openmultiplefilesdlg Class "mbextensions",lib "mbextensiondlgs.dll"(declaration variable) as string 1.found [method] ...
1
vote
1answer
29 views

Open multiple files using fileopendlg() function

I want to open multiple files using fileopendlg() function, when I code it selects only one file at a time. Is there any function or procedure to select multiple files at a time?
0
votes
2answers
32 views

How to Close all Layers but keep Tables on MapInfo using MapBasic

I'd like to know how to close all the layers on MapInfo but keep the tables open using MapBasic code. The idea is to be able to keep the tables open so that I can create multiple different maps using ...
1
vote
2answers
45 views

Bounding Co-ordinates of Polygons

I have created 250 square meter grids using the Grid Maker tool. I have given each grid a unique name. I want to find and store bounding co-ordinates (Latitude and Longitude) of each polygon in the ...
0
votes
1answer
21 views

MapBasic freezes everytime i use “.”

I'm using Map Basic IDE Version 1.6.0.0. Every time I use the "." key the IDE always freezes. This freeze happens anytime I use this key, whether it be for comments, or to access a variable's fields. ...
2
votes
0answers
47 views

Mapinfo Layout WIndow [closed]

I have to create multiple maps using the same layout, but different map views (more than 100 maps). There is a separate rectangles layer created for each view at a specific scale using the map frame ...
0
votes
2answers
34 views

Changing Background Color of Selection Rows using MapBasic?

In MI 12.5, in the Browser window, selected rows (selected either by clicking rows with the mouse or via a query) are highlighted dark blue but running the same queries in a mapbasic program selection ...
1
vote
2answers
460 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 ...
0
votes
2answers
99 views

MapBasic - Updating blank rows in column with the value above

I am writing a MapBasic tool to correct some incorrect values in a set of tables. So far I have managed to pull out the values I need in a new column: What I need is to update any blank rows in the ...
0
votes
1answer
45 views

Deleting from a view. Mapbasic

I'm using MapBasic and have used a query to get the rowids (populated in a column) of minimum values Select SUBSECT_ID, Row, Min(MaxLV)from LVQuery group by SUBSECT_ID into MinLV Now, I want to ...
2
votes
1answer
171 views

Interpolation code with Mapbasic

I have a drivetest data, and usually I do an interpolation using the values taken in the drive with their respective lat/long. I use natural neighbor. You can see an example attached. I am trying ...
0
votes
1answer
43 views

Combining two TAB files in MapBasic - losing data

I am using mapbasic to perform some calculations on a table. Everything is fine until I combine two .tab files. Both files have identical table structures, however upon combination some numerical (...
2
votes
2answers
148 views

How can I Create Line Feature using two separate point features in MapInfo

I have two MapInfo Tab files as Point feature. both the layer have the same unique ID. what I was trying to do is to connect both point using the same ID as a Line feature. so the end result will be "...
0
votes
1answer
101 views

Expression does not evaluate to a column or table name error when updating object in MapBasic

I tries to set styles for all objects in my processing_table, but gets Expression does not evaluate to a column or table name My code: '... pen_style = currentpen() 'get_pen(styles_table_name, ...
0
votes
2answers
88 views

Avoid MapBasic crash when unable to open file

I'm working on some MapBasic code and in the process I want it to open the .tab files in a given folder. But when it reaches a .tab file that it is not able to open (e.g. attached to a raster that ...
2
votes
1answer
42 views

Using specific ODBC connection when writing to SQL?

I am currently writing an output file that is generated using some Mapbasic Code into a MS SQL Database: Dim SQL_output_tablename as String SQL_output_tablename = """dbo"""&"."&"""...
1
vote
1answer
91 views

How to take object style (pen, brush, symbol) in MapBasic?

How can I take style from existing object? Brush from region, symbol from point? In MapBasic documentation and in Google I can find only how to change object's style but can't find how to take it.
0
votes
2answers
65 views

Why font size doesn't set for text in MapBasic?

I have annotations layer with that was imported from ArcGIS and want to set font in MapInfo. ArcGIS annotations contains its settings inside annotations objects (in Shape field, as I guess) but this ...
1
vote
2answers
97 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 ...
0
votes
1answer
75 views

How to list tables in MS Access database using MapBasic?

My task is read data from *.mdb files using Mapbasic. Code to open MS Access database is seen in help immediately: Register Table source_file Type ACCESS Table table_name where source_file is ...
0
votes
1answer
58 views

Problem compiling a file in MapBasic v 10.5

There are 4 error messages with the script below. Can anybody find out how to solve them please? Everything seemed to match up in Notepad++. The error messages: [End sub] found without ...
1
vote
2answers
99 views

Alias variable in MapBasic

I'm having a bit of trouble with the Alias variable in MapBasic. In short, I have a table where I was to group by a specific column. Then I want to run through each unique value from the grouped table ...
1
vote
1answer
49 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 ...
5
votes
3answers
8k views

Getting Started with MapBasic?

I am new to MapBasic. I googled for tutorials and found various PDFs but could not get started with the resources. I would be glad if anyone could provide some path for learning MapBasic.
0
votes
1answer
71 views

MapInfo/Mapbasic - test if a mapper is open

I have a custom menu that I created which opens a mappable table and I'm trying to work out how I open it when there is no other .tab files or mapper windows open there are other .tab files open ...
1
vote
0answers
46 views

MapBasic How to avoid divide by zero?

In select statement how to avoid divide by zero in mapBasic select (col1/col2) "result" .... how to avoid 0/0. If col2 is 0 it returns null. How to use ISNULL or something in mapbasic?
1
vote
1answer
199 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. ...
0
votes
1answer
62 views

'Slowing down'/wait MapBasic

I have written a script to go through each layer in MapInfo (from 1 to 168), turn layer 1 on, style it, label it, print, turn layer off, then the same for layer 2,3,4 etc. The printing works, however ...
0
votes
1answer
78 views

Sectors pointing to a lat long [closed]

Is it possible to find which sectors of a site are pointing to a specific lat long at a distance away?
-2
votes
1answer
133 views

edit text style object in mapbasic

I have created a text object, but then I want to change this object (front and size, ....). Example: I have created a text object is "Memory" the front is "news Roman Times" and the size is 12. I ...
-1
votes
1answer
100 views

mapbasic - how to link my database in my mapbasic coding

I'm creating a tool in MapBasic that identifies the PCI clash in 4G I need help: How do I add database data into MapBasic? How can I calculate mod values and colour the output in MapInfo based on ...
6
votes
3answers
3k views

Converting MapInfo TAB to GeoJSON?

Is there an easy way to convert MapInfo TAB files into GeoJSON? I am working on a web-based mapping system which will use GeoJSON to transfer data. I also use MapInfo and would like to be able to ...
1
vote
1answer
124 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
1answer
902 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?
0
votes
2answers
547 views

Drawing BTS sectors in GSM?

I'm very new to Mapbasic. I tried to make a short code to draw some BTS in GSM but I can't do thant (over 1 month). I have a table with these column: Sitename, Lon, Lat, Azi, Beam, Dist. Can ...
1
vote
1answer
1k views

Converting MapInfo (MapBasic) Script into ArcPy? [closed]

I have a MapBasic script that divides an irregular polygon into smaller polygons of 1 hectare each. Would anyone help me to convert the following into an ArcPy script. ' This program requires an ...
1
vote
1answer
79 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 ...
0
votes
2answers
1k views

How to select nth row in mapbasic?

There are multiple rows in my .tab file in mapinfo. Is there any way to select nth row in mapbasic window of mapinfo?
0
votes
0answers
165 views

Is there any way to fix the position of fixed buttonpads in the top toolbar in MapBasic?

Here is my code to create some buttons: Include "icons.def" Declare Sub Main Declare Sub button_prompt Sub Main Create ButtonPad "Providers" As PushButton Icon MI_ICON_ZOOM_QUESTION Calling ...
0
votes
1answer
119 views

Getting layer number from layer name in MapInfo (vis MapBasic)

Is there a function to get the layer number from the layer name in MapBasic? I am writing a script to loop through each layer I have and apply styles and labelling. Each layer is named _#_LINE or _#...
0
votes
1answer
50 views

MapBasic- Keeping the Selection Alive After an edit?

I have a function which is invoked from looping over selected rows in the selection table. The stored proc is invoked & everything works well for the first record in the selection however after ...
2
votes
1answer
136 views

For Each loop over an Array in MapBasic?

.NET C# developer here. Trying to figure out MapBasic with the IDE for the first time. It's shall we say...a different experience to C# in Visual studio. I have a ButtonPad with a button that calls ...
1
vote
1answer
266 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)...