COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 03-15-2024 05:21
From: Peter Møller
Subject: Relaunch loading MAPINFO layers 2021
Hi
I wrote this small sample application to test it and for me, it does work.in v2019 and v2021.1
Include "MapBasic.def"Dim nTime As IntegerClose Window 2004nTime = Timer()Do Until Timer() > (nTime + 2) '**WaitingLoopOpen Table ProgramDirectory$() & "TileServer\OSM_Roads.TAB"Map From OSM_RoadsSet Coordsys Table OSM_RoadsSet Map Window FrontWindow() Zoom 20000 Units "m"Set Map Window FrontWindow() Center (1816000, 4981000)nTime = Timer()Do Until Timer() > (nTime + 2) '**WaitingLoopOpen Window 2004
The two loops are just to allow me to see that the Explorer Window gets closed and reopened.
Does this work for you?
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-15-2024 03:53
From: Peter Møller
Subject: Relaunch loading MAPINFO layers 2021
Hi
That's weird. I did a quick test and ran this statement in the MapBasic window:
Close Window 2004
That did close the Explorer Window in my MapInfo Pro.
Let me try in a sample application too
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-15-2024 03:39
From: Mayca González Pérez
Subject: Relaunch loading MAPINFO layers 2021
Hi!!!
It does not work.I have tried both ways. It doesn't give an error but it doesn't close the explorer
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 03-14-2024 06:31
From: Peter Møller
Subject: Relaunch loading MAPINFO layers 2021
Great! I would not have expected the Explorer window to slow your process that much though.
You can try this:
Close Window WIN_WORKSPACE_EXPLORER 'or 2004
...
Open Window WIN_WORKSPACE_EXPLORER 'or 2004
Thanks
Peter
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-14-2024 06:14
From: Mayca González Pérez
Subject: Relaunch loading MAPINFO layers 2021
Indeed, if I have the browser closed, the loading goes faster.Is there a way to close the explorer when loading starts and when it finishes open it with some function in MAPBASIC?
Thanks
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 03-12-2024 06:01
From: Peter Møller
Subject: Relaunch loading MAPINFO layers 2021
Hi
I dropped this one, sorry.
One thing we have seen is that sometimes the Explorer window does slow down things a bit. But that's typically when opening and closing tables hundreds of times.
Do you the Explorer Window open when running the tool in v2021? Can you try without having the Explorer window open?
What version of v2021 are you on?
Thanks
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 12-15-2023 00:57
From: Mayca González Pérez
Subject: Relaunch loading MAPINFO layers 2021
In all parts, loading takes longer in version 2021 compared to version 15. The total charging process used to be 2 min and now it is 3 min. Thanks
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
Original Message:
Sent: 12-14-2023 01:56
From: Peter Møller
Subject: Relaunch loading MAPINFO layers 2021
Hi Mayca
Have you been able to pinpoint what part of the code is slow?
Can you try adding some timer statements like this in a handful of places:
Print Time(24) + " Opening Table 'Collector' via Server Link Table..."
The Time(24)
function returns a time expression like "07:56:12"
.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 12-13-2023 12:14
From: Mayca González Pérez
Subject: Relaunch loading MAPINFO layers 2021
Hi
I have a code in mapbasic, which creates a map based on data from an Oracle database and the layers are generated (also with Oracle data) I have the code with mapbasic 15 (MAPINFO 15) but now when moving to mapbasic 2021 (MAPINFO 2021) this loading of layers has been slowed down. Because? Is there any way to optimize that load? Thanks
Dim strTabla As String'------------- CARGAMOS EL MAPAIf gblORACLE=False Then 'Open Table gblRUTA+"\"+gblNOMBRE_MUNICIPIO+"\MAPA.TAB" as MAPA Open Table gblRUTA+"\"+gblMUN + " - " + gblNOMBRE_MUNICIPIO+"\MAPA.TAB" as MAPAElse strTabla = gblEsquema + ".MAPA" Server gblConnect Link Table "SELECT * FROM "+strTabla Toolkit "ORAINET" Into MAPA File gblTEMP+"\MAPA.TAB"End IfIf blnBackup=True Then Call Recover("MAPA")End IfIf gblSystem64=True then Map From MAPAElse Map From MAPA MaxEnd If'Add Map Layer MAPASet Map Redraw OnSet Map Layer MAPA Display Graphic Label Font ("Arial",1,7,255) With NOMBRE Auto OnSet Map Layer MAPA Editable OffSet Map Layer MAPA Selectable Off Zoom(0,100.000)Set Map Layer MAPA Display OffSet Map Redraw OffSet Table MAPA UserMap OffSet Table MAPA UserClose OffSet Table MAPA UserRemoveMap OffCall RestringirAccesoEdicion("MAPA") 'Restringimos el acceso a los municipiosIf gblORACLE=False Then Open Table gblRUTA+"\"+gblMUN + " - " + gblNOMBRE_MUNICIPIO+"\EQUIPAMIENTOS.TAB" as EQUIPAMIENTOSElse strTabla=gblEsquema+".EQUIPAMIENTOS" Server gblConnect Link Table "SELECT * FROM "+strTabla Toolkit "ORAINET" Into EQUIPAMIENTOS File gblTEMP+"\EQUIPAMIENTOS.TAB"End IfIf blnBackup=True Then Call Recover("EQUIPAMIENTOS")End IfIf gblMAS50K = True Then '---------- COLECTOR_ENC_M50 If gblORACLE=False Then Open Table gblRUTA+"\"+gblMUN + " - " + gblNOMBRE_MUNICIPIO+"\COLECTOR_ENC_M50.TAB" as COLECTOR_ENC_M50 Else strTabla=gblEsquema+".COLECTOR_ENC_M50 WHERE mun = '" + gblMUN + "' and fase='"+gblFASE+"'" Server gblConnect Link Table "SELECT * FROM "+strTabla Toolkit "ORAINET" Into COLECTOR_ENC_M50 File gblTEMP+"\COLECTOR_ENC_M50.TAB" End If If blnBackup=True Then Call Recover("COLECTOR_ENC_M50") End If Set Table COLECTOR_ENC_M50 UserMap Off Set Table COLECTOR_ENC_M50 UserClose Off Set Table COLECTOR_ENC_M50 UserRemoveMap Off Call RestringirAccesoEdicion("COLECTOR_ENC_M50") 'Restringimos el acceso a los municipiosElse '---------- COLECTOR_ENC If gblORACLE=False Then Open Table gblRUTA+"\"+gblMUN + " - " + gblNOMBRE_MUNICIPIO+"\COLECTOR_ENC.TAB" as COLECTOR_ENC Else strTabla=gblEsquema+".COLECTOR_ENC WHERE mun = '" + gblMUN + "' and fase='"+gblFASE+"'" Server gblConnect Link Table "SELECT * FROM "+strTabla Toolkit "ORAINET" Into COLECTOR_ENC File gblTEMP+"\COLECTOR_ENC.TAB" End If If blnBackup=True Then Call Recover("COLECTOR_ENC") End If Set Table COLECTOR_ENC UserMap Off Set Table COLECTOR_ENC UserClose Off Set Table COLECTOR_ENC UserRemoveMap Off Call RestringirAccesoEdicion("COLECTOR_ENC") 'Restringimos el acceso a los municipiosEnd If'------- COLECTORIf gblORACLE=False Then Open Table gblRUTA+"\"+gblMUN + " - " + gblNOMBRE_MUNICIPIO+"\COLECTOR.TAB" as COLECTORElse strTabla=gblEsquema+".COLECTOR WHERE mun = '" + gblMUN + "' and fase='"+gblFASE+"'" Server gblConnect Link Table "SELECT * FROM "+strTabla Toolkit "ORAINET" Into COLECTOR File gblTEMP+"\COLECTOR.TAB"End IfIf blnBackup=True Then Call Recover("COLECTOR")End If
------------------------------
Mayca González Pérez
COMUNIDAD. AUT. REG MURCIA
------------------------------