12-12-2022 07:52 AM
Hello,
My colleague has recently installed DIAdem 2022 on his PC & it is working fine. But we have an observation in the map plot in the report of DIAdem 2022. When the MF4 file is loaded in DIAdem 2022, the map plot gets deteriorated. For reference I have attached two files.
054_2020 – is the file processed with DIAdem 2020
119_2022 – is the file processed with DIAdem 2022.
Dim Sheet, Area, Map, AreaName, Image
Dim oMyObjects, oMyPosition
Call View.NewLayout()
Set Sheet = View.ActiveSheet
Set Area = Sheet.ActiveArea
Area.DisplayObjType = "Map"
AreaName = Area.Name
Set Map = Area.DisplayObj
Map.CachePath = ProgramDrv & "Examples\Documents\MapCache"
'Map.MapType = "Cache"
Map.MapType = "OSM Mapnik"
Map.ZoomLevel = 12
Map.ShowTrack = True
Map.MapMovingMode = "center"
'Map.UseCache = True
Map.UseCache = False
Map.SynchronisationChannelName = "[9]/TripTime"
Map.LongitudeChannelName = "[9]/GPS_Longitude"
Map.LatitudeChannelName = "[9]/GPS_Latitude"
Map.ColorChannelName = "[10]/imGPS_GROUND_SPEED"
Map.SynchronisationDimension = "X-Cursor"
Map.LongitudeDimension = "Y-Cursor"
Map.LatitudeDimension = "Z-Cursor"
View.Sheets(1).Cursor.P1 = 2800
if Map.MapType = "OSM Mapnik" then
Do While Map.isBusy
Call Pause(0.1)
Loop
end if
Call WndShow("VIEW")
Call View.Refresh()
Call ScriptStart(ProgramDrv & "Resource\VwLayTrans", "VWTransViewRep", False)
Set Sheet = Report.Sheets(Report.Sheets.Count)
Set Image = Sheet.Objects(AreaName)
Image.UseOriginalRatio = TRUE
Report.Settings.ImageExport.JPG.Quality = 1
Report.Settings.ImageExport.JPG.Width = 794
Report.Settings.ImageExport.JPG.Progressive = 5
Report.Settings.ImageExport.JPG.UseRatio = True
Call Image.ExportToImage(sPathDocuments & sPathFolder & ".jpg", eImageExportTypeJPG) 'Export the file
Report.Sheets("Map").Objects("Metafile3").FileName = sPathDocuments & sPathFolder & ".jpg"
Call Report.Sheets.Remove("VIEW-REPORT")
Can you please help us to solve the problem?
Solved! Go to Solution.
12-14-2022 04:52 AM
Hi MarekNebyal,
I have tested your script and only replaced the data with my own.
For me, the display was flawless.
For the creation of graphics we use GDI+ from Microsoft. This graphics engine decides on its own how the graphics are created, i.e. if for example the hardware of the graphics card is used. So it might be helpful to check if all graphics drivers are up to date.
Greetings
Walter