No worries, Mayca, we have all been there where we can't see the forest for all the trees :-)
And I should have checked my answer before posting it too.
Original Message:
Sent: 05-28-2024 01:09
From: Mayca González Pérez
Subject: functions icons dimensions
I'm sorry. What a stupid mistake
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 05-25-2024 01:19
From: Peter Møller
Subject: functions icons dimensions
It seems I misspelled ConvertToRegion
in my previous post. You are missing an r in the function name.
If have fixed the misspell in the previous post
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 05-23-2024 14:57
From: Mayca González Pérez
Subject: functions icons dimensions
Hi.
When converting I get an error when compiling
Unrecognized command: (.
Dim i_obj_type As SmallInt, x1, y1, x2, y2, x3,y3 As Float, new_pnt As Object
i_obj_type = ObjectInfo(objOBJECT, OBJ_INFO_TYPE)
' ... then the object is a polyline...
x1 = ObjectNodeX(objOBJECT, 1, 1) ' read longitude
y1 = ObjectNodeY(objOBJECT, 1, 1) ' read latitude
x2 = ObjectNodeX(objOBJECT, 1, 2) ' read longitude
y2 = ObjectNodeY(objOBJECT, 1, 2) ' read latitude
x3 = ObjectNodeX(objOBJECT, 1, 3) ' read longitude
y3 = ObjectNodeY(objOBJECT, 1, 3) ' read latitude
print x1+","+y2+","+x2+","+y2
objOBJECT= Exec("MapCAD.mbx","CircleFromPointsXY", x1,y1,x2,y2,x3,y3)
objOBJECT = ConvetToRegion(objOBJECT)
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 05-21-2024 02:01
From: Peter Møller
Subject: functions icons dimensions
Oracle doesn't support these "cosmetic" object types like ellipse, rectangle, and similar.
You will have to convert these to polygons/regions and/or polylines.
You can do this using the ConvetToRegion()
and ConvertToPline()
functions in MapBasic.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 05-20-2024 12:33
From: Mayca González Pérez
Subject: functions icons dimensions
Okay. It has worked.Now my doubt arises to save it in the database. I have a database in ORACLE. In the MAPINFO_MAPCATALOG table in the SPATIAL field I have defined 13.3.When I hit save it gives me the following error.How can I define the table so that it allows me to save that geometry?
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 05-17-2024 01:29
From: Peter Møller
Subject: functions icons dimensions
Hi Mayca
There may be a few ways to pick up these coordinates from the map.
- You can create a toolbutton with a Point drawmode and every time the user has clicked three times, you can create a circle using the last three points.
- You can create a toolbutton with a Polyline drawmode and ask the user to create a polyline with 3 points. When the user ends the polyline, extract three nodes from the polyline and build a circle using these.
The polyline method could be tricky as the user could, by accident, click more than three times. I would use the first three points from the polyline or the first two and the last.
Are you recreating the tool to ensure the circle is created in the right layer?
I hope this helps
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 05-16-2024 06:46
From: Mayca González Pérez
Subject: functions icons dimensions
Ok we have this function, but how can I make the points dynamic. That is, the user points them out
'Creates a new circle object.
Dim NewObj as object
NewObj = Exec("MapCAD.mbx","CircleFromPointsXY",
434204.02,5566829.13,434219.39 ,5566833.997,434218.18,5566852.19)
Insert into [Table] (obj) values (NewObj)
'Updates objects with calculated circles from coordinate columns (X1 ...Y3).
Update [Table] set obj=Exec("MapCAD.mbx","CircleFromPointsXY", X1, Y1, X2, Y2, X3, Y3)
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 05-14-2024 03:07
From: Peter Møller
Subject: functions icons dimensions
Hi
Several of the MapCAD functions can be called via the Exec() function through MapBasic.
Check out this document: MapCAD Tools Executable via Exec() function
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 05-13-2024 15:18
From: Mayca González Pérez
Subject: functions icons dimensions
And how can I call those functions from MAPBASIC?
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 05-13-2024 09:44
From: Peter Møller
Subject: functions icons dimensions
The other 3 are features from MapCAD so they aren't referenced in the menu.def
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 05-13-2024 02:51
From: Mayca González Pérez
Subject: functions icons dimensions
What functions in the MENU.def file correspond to the following icons?
The first is M_TOOLS_RULER and the rest?
Thanks
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
------------------------------