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
14 views

MapBasic issue in creating Thematic with Shade

I'm trying to write a bit of code that looks the columns of a table and if they match by text, then generate a thematic of predefined ranges. So far: Include "MapBasic.def" Declare Sub ...
0
votes
1answer
28 views

Using MapBasic, is there a method to compress GeoTIFF after programatically creating the GeoTIFF?

I need to compress the file sizes of GeoTIFFs that are created when running the MapBasic application. In a .Net application, I transform the GeoTIFF into a compressed JPG using ImageMagick; which ...
0
votes
1answer
185 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\...
0
votes
1answer
50 views

MapBasic, MapInfo Pro automation of existing Raster Operations

I have the latest version of MapInfo Pro and I would like to know if it is possible to fully automate the use of existing Raster operations into several files at once? For example, having several ...
3
votes
3answers
1k views

Mapbasic cycle through directory of tab files

I want to cycle through a directory of .tab files and then run a process on the files. I found https://groups.google.com/forum/#!topic/mapinfo-l/reYENsRRziM but can't figure out how to define the path ...
0
votes
1answer
24 views

Does Mapbasic work with MapInfo Discover?

Does Mapbasic work with MapInfo Discover? From what I've been able to figure out it does not. I was really hoping to make some macro style things to help automate some of our process but it doesn't ...
4
votes
1answer
484 views

MultiListBox array error

I have created a MultiListBox control which is populated with a list of all currently loaded TAB file names in MapInfo. The user selections are then read from the MultiListBox and added to another ...
0
votes
1answer
1k views

Automatically updating table column with name of table using MapBasic

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
957 views

Deleting duplicates from multiple tables using MapInfo

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?
1
vote
0answers
65 views

Nearest statement - Mapbasic

When I use the nearest statement in mapbasic, not all the "from table" points show up. For example I am looking for the nearest distance neighbor of every point in a table (called Points). I use this ...
0
votes
1answer
76 views

Mapinfo - Compare Road Direction

I have two layers of Road Networks. How do I compare the difference in road direction between the two layers - both are polylines?
0
votes
0answers
44 views

Get last word of string in MapInfo

In pure Mapinfo SQL Update code I need to extract the last word of a string. Ex SUTHERLAND STREET BURKE DEVELOPMENTAL ROAD Street Not Specified The following Update DCDB_DNRME Set road_type = Mid$(...
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
36 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
87 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
1k 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
79 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
38 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
57 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 ...
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
205 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
174 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
14k 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
187 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
94 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
329 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
222 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 ...
1
vote
2answers
141 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
101 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
195 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
2answers
177 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
107 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
785 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
190 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
410 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
406 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
114 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 ...
1
vote
1answer
127 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
75 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
144 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
568 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
636 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 ...
2
votes
1answer
370 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
540 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
273 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
111 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 ...
1
vote
1answer
511 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
2 3 4 5 6