Can anyone help me to create a points without long/lat in mapbasic if i have a table with variable integer.

enter image description here

I will have popupmenu for this table and everytime i select one it will create a points equally separated (10m or 15m) to each other (vertically separated) and name each point with suffix of how many points was created.. ex. Loc_1_1, Loc_1_2.... up to Loc_1_10 (if i choose the first row).

The View map would look like below,

enter image description here

  • You have a table and you select a record and then the tool will create a number of points, but where will these points be created? In the map? Next to the selected record or? – Peter Horsbøll Møller May 8 '15 at 8:47
  • Thanks Peter. Yes, I should have long/lat. I think I could able to have it but it should be view on different map. Im planning to have the points to be created and update a table. – Ivan May 8 '15 at 13:04

Some ideas that you might want to chase or look into.

First you want to get the object from the current selected object, the name and read the number of copies you want to create:

Fetch First From Selection
oPoint = Selection.OBJ
nCount = Selection.Counts
sName = Selection.Name

Next thing is to create the copies. Here I'm inserting them into a temp table that you also need to create. In the code below I'm offsetting the current point 100 meters to the north. The first is offset 100 meters, the second is offset 200 meters and so on

For i = 1 To nCount
   Insert Into TEMP_TABLE
      (NAME, OBJ)
         (sName & "_" & i, Offset(oPoint, 90, i * 100, "m")
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.