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
2answers
22 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 ...
2
votes
0answers
24 views

Mapinfo Layout WIndow

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
38 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
21 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 ...
0
votes
1answer
35 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
57 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
56 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, ...
1
vote
1answer
39 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
42 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 ...
0
votes
2answers
42 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 ...
0
votes
1answer
50 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 ...
2
votes
1answer
38 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 = ...
1
vote
2answers
64 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
2answers
53 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
39 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 ...
0
votes
1answer
59 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
40 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?
0
votes
1answer
42 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
70 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?
-1
votes
1answer
87 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 ...
1
vote
1answer
107 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 ...
0
votes
1answer
53 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
1answer
547 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
71 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
1answer
92 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 ...
1
vote
2answers
458 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 ...
0
votes
1answer
46 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
94 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
210 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 ...
3
votes
1answer
261 views

How can I change region style in MapBasic

I've problem with my code in MapBasic for change region style in MapBasic. I've created voronoi and I want to select that voronoi and change the style of it to yellow border and no fill. I already ...
1
vote
1answer
185 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
votes
1answer
55 views

Window Message Font in MapBasic [closed]

How can I write texts with different colors per text in the same window message using MapBasic?
1
vote
1answer
48 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 ...
0
votes
2answers
73 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 ...
0
votes
1answer
378 views

How to setup an ODBC Connection with Access database in Mapbasic

Good day! i'm trying to setup an ODBC connection in my Access database through mapbasic code, but i don't how should i start this code. I could make it manually and able to have a link between my ...
0
votes
1answer
202 views

Edit listbox and table value from a dialog box

Good day! I have a code that import my table on a listbox and able to add on it. i was stock on some codes when i double click a selected value on my listbox to open another dialogbox to edit (the ...
0
votes
1answer
96 views

Creating points from variable without long/lat using MapBasic?

Can anyone help me to create a points without long/lat in mapbasic if i have a table with variable integer. I will have popupmenu for this table and everytime i select one it will create a points ...
0
votes
1answer
277 views

Mapbasic - Create a Table array based on a variable

I wanted to create a temporary table as per my variable. If i have a value of 10, it will create a table with 10 rows. How should i start my code in MapBasic?
2
votes
1answer
152 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 ...
1
vote
1answer
84 views

How do I make a thematic layer 50% translucent in MapBasic?

I'm trying to make this enhancement to an old program written by another author. I was able to make the layer translucent prior to Shade Window command, but its not working. Here is the code: Add Map ...
0
votes
1answer
139 views

Draw lines from points to points not by lon/lat in mapbasic

How to draw lines from points to points not by lon/lat What I need is a cross connection with cable like the image below: I have N input and M output points Any idea will be appreciated highly.
0
votes
1answer
36 views

MapBasic tool not compiling due to undefined variable

I am attempting to compile a quick MapBasic tool I have written, however it won't compile despite the variable being clearly defined It's probably something simple I am missing, can somebody point ...
1
vote
1answer
184 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
0answers
53 views

PRACH data plotted in a better way but not completely

I am close to finishing the visualization of PRACH in mapinfo. Here's my output so far (for 4 counters) Unfortunately, for some sectors it is not working as it should be. Can you please help out? ...
0
votes
2answers
84 views

PRACH all counters plot not well visualized

Here's the output that Im getting: Im not sure why it is doing this.. I want it to be more like this When i try plotting only two counters (two radii): It is giving me this: I hope it is ...
0
votes
0answers
73 views

PRACH data mapped right but arcs not on top properly

PRACH data is mapped right. However, how would it be possible to draw the arcs on top of each other for all the 21 PRACH counters? Here's a snapshot of the code: Fetch First From ToUpdate Do While ...
-1
votes
1answer
138 views

Same Sector Created in Mapinfo Help

The PRACH data is saved into a tab and then moved into another tab file "ToUpdate" Select * from PRACH_data where Obj into ToUpdate Fetch First From ToUpdate Do While Not EOT(ToUpdate) circ = ...
0
votes
1answer
188 views

Create Sector PRACH in Mapinfo

I am trying to write a code that creates the PRACH per sector per band for a site. My PRACH data contains: "Site name, lat, long, beamwidth, azimuth, and distance" I got to the point of creating ...
0
votes
0answers
38 views

Find Crossovers for multiple contours drawn over a lake

I am new to MapBasic and wanting to help out with this problem. I have some ideas on what the algorithm might be to start this problem but I have never written anything in MapBasic. I do have some ...
0
votes
2answers
486 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 ...