NefMoto

General => General Discussion => Topic started by: MattV8 on February 23, 2015, 08:08:53 AM



Title: Tunerpro export
Post by: MattV8 on February 23, 2015, 08:08:53 AM
Has anyone created a tool to export an xdf file into a csv? I can export the map itself, or in winols I can export to csv, but can't see any way of doing this in tunerpro? Have done a search and (probably blindly) not found anything. No biggie if not - The xdf format is simple enough xml, I'll write something and share it here if that would be useful.
Thank you
Matt


Title: Re: Tunerpro export
Post by: MattV8 on February 27, 2015, 07:28:19 AM
Here you go - in case useful to anyone.
Parses an XDF file into a similar format as WinOLS export. In my case, I wanted to reconcile a couple of different maps created on different products.
Just a bit of simple vbscript - I ran it via excel, but could equally easily be run via cscript on a command prompt.

Code:
Option Explicit

Sub RunMe()
Dim infileName, exfileName As String
Dim thisElement As IXMLDOMElement
Dim exfile As TextStream

'Define the import and export filenames
infileName = "c:\somepath\4D1907558B.xdf"
exfileName = "c:\somepath\4D1907558B.csv"

'Open the export file for appending (create if doesn't exist)
With New FileSystemObject
    Set exfile = .OpenTextFile(exfileName, ForAppending, True)
End With

On Error GoTo error_handler

'Open the xml file and loop at the top level
With New MSXML2.DOMDocument
    If Not .Load(infileName) Then Err.Raise vbObjectError, "XDF Parser", "Unable to open the source file '" & infileName & "'"
    
    For Each thisElement In .getElementsByTagName("XDFTABLE")
        exfile.WriteLine """$" & Mid(thisElement.getAttribute("uniqueid"), 3, 5) & """;""" & thisElement.getElementsByTagName("title").Item(0).Text & """;""" & thisElement.SelectSingleNode("XDFAXIS[@id=""x""]/indexcount").Text & "x" & thisElement.SelectSingleNode("XDFAXIS[@id=""y""]/indexcount").Text & """"
    Next thisElement
End With

GoTo EndSub

error_handler:
    MsgBox Err.Description, vbCritical
EndSub:
    exfile.Close

End Sub


Title: Re: Tunerpro export
Post by: nyet on February 27, 2015, 10:17:36 AM
Has anyone created a tool to export an xdf file into a csv? I can export the map itself, or in winols I can export to csv, but can't see any way of doing this in tunerpro? Have done a search and (probably blindly) not found anything. No biggie if not - The xdf format is simple enough xml, I'll write something and share it here if that would be useful.
Thank you
Matt

mapdump (included in ecuxplot) converts .kp to .csv


Title: Re: Tunerpro export
Post by: MattV8 on February 27, 2015, 12:12:26 PM
No worries - thanks. Managed to do what I wanted - to dump both a winols and xdf out to a spreadsheet so I can reconcile them.

I "think" the 366304 maps that are on here aren't that accurate (or at least, lots of the map addresses don't tie up) - so am working on creating on all the map points necessary to turn off SAI, rear lambda, speed limiter and do a stage 1 tune. Happy to share if this is useful stuff. Is there a general preference - tunerpro or winols?


Title: Re: Tunerpro export
Post by: vwaudiguy on February 27, 2015, 04:27:04 PM
Winols is much more flexible and powerful. It's also a lot more complicated.


Title: Re: Tunerpro export
Post by: MattV8 on February 28, 2015, 05:33:20 AM
Thanks - I've been teaching myself both in order to compare...and I agree. Having now extracted some usuable maps from the tunerpro map I had, it's all Winols now.