Hi all

This is my first time here. Sorry for my english. I'm from Argentina.

I have the next problem working with MapBasic/MapInfo 5.01

I create a table using bounds to get more precision.
If I draw point using a ToolButton with DrawMode DM_CUSTOM_POINT I can put
points very very near. (5 mm If a want)
But the problems appears when I want to connect theses points with a
polyline using the DrawMode
DM_CUSTOM_POLYLINE). The polyline nodes precision is not the same that the
map allow.

If I use the polyline tool from MapInfo directly there is no problem

I  supouse is a MapBasic bug. I believe also occurs in MapX.

Can anyone help me ?

The example code is:

----------------------------------------------------------------------------
-----------------------------------
Include "mapbasic.def"
Include "menu.def"
Include "icons.def"

Declare Sub Main
Declare Sub sDibujar_Polilinea
Declare Sub sDibujar_Punto

Sub Main

        Dim x,y as float
        Dim objeto as object            

        Create ButtonPad "Prueba" as
                ToolButton
                        HelpMsg "Dibujar Polilinea"
                        Calling sDibujar_Polilinea
                        Icon 221
                        DrawMode DM_CUSTOM_POLYLINE
                ToolButton
                        HelpMsg "Dibujar Punto"
                        Calling sDibujar_Punto
                        Icon 222
                        DrawMode DM_CUSTOM_POINT

        Create Table "prueba" (aaaa Char(10)) file "C:\Temp\prueba.tab" TYPE
NATIVE Charset "WindowsLatin1"
        Create Map For prueba CoordSys Earth Projection 1, 104  Bounds ( -74,-56 )
( -53,-21 )

        Map From Prueba
        Set Map
                Center (-57.91469456,-42.87095857)
                Zoom 1 Units "m"
                Distance Units "m"
                Preserve Zoom Display Zoom
                Layer prueba Editable On
        Set Coordsys Earth Projection 1, 104 Bounds ( -74,-56 ) ( -53,-21 )

End Sub

Sub sDibujar_Polilinea

        Dim objeto as Object
        Dim lsmi_q_nodos, lsmi_x as Smallint

        objeto = CommandInfo(CMD_INFO_CUSTOM_OBJ)

        lsmi_q_nodos = ObjectInfo(objeto, OBJ_INFO_NPNTS) 
        objeto = ExtractNodes( objeto, 1, 1, lsmi_q_nodos, False ) 
        
'       For lsmi_x = 1 to lsmi_q_nodos
'       Next

        Insert Into prueba (obj) Values (objeto)

End Sub

Sub sDibujar_Punto

        Dim x,y as float
        Dim objeto as object

        Create Point Into Variable objeto
(CommandInfo(CMD_INFO_X),CommandInfo(CMD_INFO_Y))
        Insert Into prueba (obj) Values (objeto)

End Sub
----------------------------------------------------------------------------
-----------------------------------

Thanks

Alejandro
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to