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
0answers
170 views

Reload image in MapInfo

I have a mbx that creates a layout. The layout consist of a number of .wmf pictures and ofcource a map. During the execution I create .Tab files that reference to the pictures looking like: ...
1
vote
1answer
720 views

How to hide coordinates points in mapinfo?

I have created labels ,legends scale and North-direction pointer but I now need to conditionally hide or show the points using button in mapbasic program but I don't know the syntax. Where can I ...
0
votes
2answers
693 views

Update Column to a Value

I'm trying to update a column to a value in Mapinfo/Mapbasic using Add Column "MMT_PARCEL_MP" (Limited_StratumTF )From Limited_Stratum Set To "T" Where intersects and just getting an 'Unable to ...
0
votes
1answer
4k views

Compare two tables. Show values only in one table

I have two tables. Each table has a column with a reference number. Most of the records in these tables are the same but there are some which are in one table but not in the other. How can I compare ...
0
votes
1answer
2k views

Removing non-alphanumeric characters from string in MapBasic?

I have a user-entered string which I am using as a search term. I would like to display the results in a table named "SearchResults_"+SearchString. However the string could feasibly contain characters ...
0
votes
1answer
208 views

How to manipulate select query in mapinfo so that it does not high light the selected data?

I have select query in a button but I don't want user to see the way I am changing the map coordinate while selecting specific points and adding a layer. How is it possible to do that in a button ? ...
0
votes
1answer
19k views

How to plot geographical coordinates in mapinfo?

I want to get started with mapinfo and plot some coordinates i.e latitude and longitute . How is it possibe?
0
votes
3answers
4k views

Copying objects to existing records in MapInfo

This should be fairly simple but I think I'm missing something... I have two tables of similar structure with corresponding data in them (i.e. same number of rows, rows have the same IDs). The main ...
0
votes
2answers
276 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 ...
0
votes
2answers
990 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
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
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 ...
0
votes
2answers
2k 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
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
402 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 ...
0
votes
1answer
371 views

Create polyline using MapBasic (unknown number of nodes)

I'm trying to create pline using MapBasic. My idea was to create simple tool with dialog box containing couple of EditBox, PopupMenu's to retrieve pline attributes from user. So far I have only making ...
0
votes
1answer
389 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
450 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
896 views

In Mapbasic, How to populate my table row data in a dialog box with RadioGroup and EditText

Good day! Im trying to pupulate my table row data in a dialog box with Radiogroup and editText control. I successfully get the column value list from popupMenu control after selecting the table and ...
0
votes
1answer
1k views

Find if a table is mappable/contains an Obj column

How do I check whether a table is mappable? I am trying to select all records from a table that contain objects, like this: Select * From TableName Where Obj Into TempTable If a table doesn't have ...
0
votes
2answers
335 views

How to uncheck toggle button in mapbasic?

I want to check un check togglebutton but I don't know how to alter using mapbasic. Is there any command to alter it? I could not find it in MapInfo user guide. I have command: Alter Button But ...
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
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,...
0
votes
1answer
103 views

One to many join mapbasic

I have a dataset with parcels with a unique lotplan - lets say it has 10,000 records. I have a dataset which has owner info which has one or many owners for each lotplan lets say it has 11,0000 ...
0
votes
1answer
88 views

MapBasic centroid in EPSG:28354

I have a table in MG94 Z 54 (EPSG:28354). My MapBasic statement is Commit Table DCDB As "C:\DCDB_Full_Copy.TAB" TYPE NATIVE Charset "WindowsLatin1" CoordSys Earth Projection 8, 116, "m", 141, 0, 0....
0
votes
2answers
212 views

Error in MapBasic CreatePoint statement (argument out of range)

I'm writing a mapbasic create point statement and getting an argument out of range error when running the code. I've been though it a hundred times and can't figure out where my mistake is. I'm ...
0
votes
1answer
82 views

Mapbasic set mapwindow for hotlink code to run

I need to run a hotlink process on a dataset but I keep getting a "Could not convert data" Map From DSC_DCDB Browse * from DSC_DCDB Set Map Window DSC_DCDB Layer 1 Activate Using PATH_Survey+...
0
votes
2answers
1k 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
274 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 (...
0
votes
1answer
247 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 ...
0
votes
1answer
117 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 ...
0
votes
1answer
137 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 ...
0
votes
1answer
100 views

Window Message Font in MapBasic [closed]

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

Accessibility to developer of “Alter” and similar constructs in MapInfo MapBasic

Parts of the MapInfo MapBasic API are accessed as follows: Alter ButtonPad "Main" Add ToolButton ID 101 Icon 8 Calling OnToolClicked HelpMsg "...
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....
0
votes
1answer
629 views

MapBasic For Loop ignoring every other row

I have made a loop in MapBasic but is it only updating every other row in the table: My code works from the bottom of the table upwards to generate start and end coordinates for polyline features: ...
0
votes
1answer
1k views

Creating points based on coordinates in MapBasic

I am currently working on a MapBasic tool that generates start and end coordinates for a polyline layer. So far I have successfully populated 4 columns in a table (SX, EX, SY, EX) with coordinates of ...
0
votes
3answers
1k views

How to set code for designer legend in mapbasic

last couple of days i am doing work on thematic maps using mapbasic. I am getting error while set the legend code. it giving me unrecognized command or code kind of error ... my code is Create ...
0
votes
1answer
937 views

How to write code for page setup in Mapbasic

I am very new to mapbasic scripting. i am creating thematic map using mapbaic code. For that i am searching code for Page setup to set my map as landscape with A4 size. But i didn't found any code for ...
0
votes
1answer
1k views

How to work with tables in MapBasic?

I try to get data from table use MapBasic: Dim nCol = "ColumnName" Fetch First From Untitled Do While Not EOT(Untitled) colValue = Selection.nCol Note colValue Fetch Next From Untitled Loop ...
0
votes
2answers
854 views

Updating a column with line direction in MapInfo

I was wondering if there is a way to update a column in MapInfo with the digitised line direction. I have two TAB files, one is complete lines and the other is sections of the same lines (both have a ...
0
votes
1answer
871 views

In MapBasic, how do I allow a user to choose a folder?

I have used the FileOpenDlg() function to allow the user to choose a file. I would like to do the same thing to allow them to choose a folder so I can save files to the folder without the user having ...
0
votes
1answer
597 views

In MapBasic, how do I register a table in XLS format that has a different range from one execution to another?

I need my application to be able to register an XLS table that does not have a set range. One time it may be A2:AL10000, the next it may be A2:AL2000, etc. I have not seen this anywhere in the ...
0
votes
1answer
916 views

MapBasic. Where-clause in Select Statement

What is wrong with this statement? I reckon the where-clause is the problem. Select * from "BEDIRECT_POT_" + vo_num, PLZ5_2012_bereinigt where "BEDIRECT_POT_" + vo_num.PLZ like PLZ5_2012_bereinigt....
0
votes
1answer
633 views

Get EditText value with event handler in MapBasic

I have a dialog in MapBasic that includes an EditText control, a PopupMenu control and a button. When the user presses the button a sub is called. In this sub I would like to get the values of the ...