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
2
votes
1answer
2k 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 ...
0
votes
1answer
17 views

Write variable content into specific cell of datasheet (Mapbasic)

I have a value stored in a variable. How can I write this value to a table (for example into Row2 Column4) using Mapbasic?
1
vote
0answers
46 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 ...
0
votes
1answer
927 views

Writing 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
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 ...
0
votes
2answers
27 views

Mapbasic v15 open wor within existing mapview

Using Run Application "G:\System\SSA\wor\Current\Townplanning_2018_v1\Zoning.wor" that's called from within a mapbasic program I want to load the workspace in the current map view rather than in a new ...
0
votes
1answer
36 views

Get code to run on every column in a table -Error “Could not find a public static method named …” -Mapbasic 17

I need to run a table update command on every column in a table. The code works fine when I manually define the column to work in but not when it is part of a for loop that gets all the column names I ...
0
votes
0answers
24 views

Mapbasic crashes when simple print to text file is added

I want to log the message text in a mapbasic script to a txt file but the program now crashes. Print ProcessThese.FullPath Open file "D:\4_RefreshMB.txt" for output as #1 Print #1, ProcessThese....
2
votes
1answer
1k views

Creating 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. i Used the below script i found in the Web, and it was for only single site I made automated it ...
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 ...
0
votes
1answer
101 views

Custom tool for Mapinfo

I'm new to Mapinfo and Mapbasic as well. I need to build a tool like in ArcMap (pythonaddins). The goal is to have a gui application which has three dropdown lists. First is a list of layers in ...
9
votes
4answers
13k 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
3answers
182 views

Creating 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...) fails to work most of the time as part of the program (although it works ...
0
votes
2answers
47 views

Run mapbasic 32 bit mbx from larger mapbasic 64bit project

I need to run a 32-bit mbx within a 64-bit mbx -is this possible? Basically within a larger 64bit mbx routine, I need to call a mapbasic 32 bit mbx so that I can apply some regex code to a table. ...
0
votes
1answer
197 views

How to print table information using mapbasic

How do I print a tables information in Mapbasic? I have a snippet of code - I want to select all features within a buffer and then print the results as a message in mapinfo that can be copied out into ...
1
vote
1answer
142 views

MapBasic IDE Switch from Code view to Design view

I am brand new to mapbasic and I am working on a mapbasic project already developed. The previous developer has left and is not available for questions. I have searched mapbasic documentation and ...
0
votes
2answers
101 views

Show MapBasic Window equivalent in QGIS, e.g. Python Window

Is there a Show/Hide MapBasic Window (or equivalent) in QGIS such as in MapInfo? I would like to learn SQL expressions parsing, or a Python Window viewer?
0
votes
1answer
87 views

Error in SQL query in mapbasic

I am writing below SQL query in mapbasic to insert columns from two tables t1 and t2 into table Sites but error is occuring "Variable or field t2.CELLID not defined" Table Sites (Source integer, N ...
1
vote
0answers
169 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?
0
votes
0answers
20 views

Unable to divide by zero mapinfo [duplicate]

I've to calculate a percentage in this query in mapbasic: Select * from Presence where Date="2016-10-09" into H1 noselect order by Municipalities Select * from Presence where Date="2016-10-16" into ...
1
vote
2answers
127 views

Opening and saving multiple shapefiles as .tab files? [closed]

How do I open several shapefiles, save as Tab files then append as one table using MapBasic code? I have created a list that contains the tables and path to tables. But cannot loop to save tables ...
0
votes
2answers
52 views

Mapbasic Error - Alter Object cannot operate on an unitialized object variable

I get this error when running an mbx in Mapbasic Include "MapBasic.def" Include "Menu.def" 'assign brush/pen symbology for all but easements dim b1 as Brush b1 = makebrush (1,...
2
votes
2answers
657 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
2answers
3k views

Select only records with region objects in MapBasic

I am writing a program that finds overlapping objects. I can't perform the AreaOverlap() function on objects that don't enclose an area (e.g. text, points) as the result would be meaningless. Is ...
1
vote
1answer
103 views

Mapbasic work in current directory

Is it possible to get mapbasic to use the current directory for processes? So rather than the following where WFolder is manually set as the working folder can I get it to just work in the folder ...
1
vote
2answers
332 views

mapbasic convert raster to mrr

I'd like to convert a whole folder of files from GRD to MRR. Is this possible in mapbasic or from the interface or do I need to do them file by file? I have tried to searching in the mapbasic forums ...
0
votes
1answer
321 views

Printing select query result in text file in mapbasic

I want to print a select query having number of records in text file in mapbasic but no successful results as i am using below code: Open file "E:\Export.txt" for output as #1 Print #1, select Col1, ...
1
vote
1answer
100 views

Mapbasic write and read csv into python tuple type structure

In mapbasic I need to read a csv into an array but arrange each row of the csv independently. See the current result, code etc below. I want it to be something like a python dictionary ([Bushfire_V ...
0
votes
0answers
107 views

Converting .grd to .asc using MapBasic in MapInfo 16

Can someone please provide an example to show how this would work. For example, I am trying to convert from .GRD to .ASC, would my MapBasic code look like this: public void Convert(string "C:\Users\...
1
vote
1answer
70 views

Performing multiple selection using MapBasic?

I am new to MapBasic programming. I am trying to make multiple selection from a table where the ID number exist in my array and save all the values into another table which called results. ...
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
1answer
402 views

MapInfo/MapBasic SQL query

I've done a little bit of SQL query in MapBasic, but somehow get lost in this problem. I'm hoping that someone can help me out. I have a table of polygons in 2 groups, F and E. F polygons are larger ...
2
votes
2answers
445 views

Mapbasic Code - Change Symbol Style Basic on Column Content

I wrote a piece of code a while ago for colouring lines depending on what was in a certain column. I struggled through it, but managed to get it to work. Now, I want to write a piece of code that will ...
1
vote
1answer
299 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
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.
2
votes
1answer
258 views

Making 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 ...
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 ...
0
votes
1answer
2k views

Setting up 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
399 views

MapInfo 12.5 or 16 writing scripts

Fairly new to MapInfo both versions. I am a efficient user of ArcGIS, but my query being I was reading up on MapBasic but all the examples for these scripts are for running within MapInfo. Is there ...
3
votes
3answers
3k views

Check if an object is empty in mapbasic

I have mapbasic code that manipulates the obj-column in a point-table. Some rows doesn't have any geometry so the obj-column is empty. My question is how to check if there is no object? All the ...
1
vote
2answers
140 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 clearer ...
2
votes
1answer
1k 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
2answers
1k 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 ...
4
votes
1answer
2k views

How to change the view of a map window in MapInfo to a new center coordinate?

How can I change the map view of a map window in MapInfo Professional to a new center coordinate? I need to change the viewed map in the MapInfo window via a predefined set of coordinates via MapBasic....
2
votes
2answers
94 views

Changing Background Color of Selection Rows using MapBasic?

In MapInfo Pro 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 ...
2
votes
2answers
2k 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 ...
3
votes
3answers
2k views

Fully automating a workspace to create maps with different file names but same information?

I have a lot of maps (over 600) to create. They all contain the same column titles and the layouts will be the same. I don't want to have to go through and repeat the same process everytime, I would ...
2
votes
1answer
692 views

Adding file name of mapinfo file into its attribute table using MapBasic?

I have a task where I need to take the file name (no extension) of a MapInfo file and place it into a new field within its attribute table. I would normally use Arcpy to do something similar, but I ...
2
votes
1answer
342 views

Interpolation code with MapBasic

I have 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 to ...