08-02-2016 07:36 AM
I'm having a problem selecting (through my script) a specific .csv plugin to load my data.
I am using a Call FileDlgShow command:
Call FileDlgShow(DataReadPath, "Thermotron_CSV,*.csv|TDM Files,*.tdm|DAT Files,*.dat|All Files, *.*", "Data selection", True)
When I execute this command, I recall a plugin format that is not the “Thermotron.CSV”.
It looks like it is using a different plugin.
Any Ideas?
Solved! Go to Solution.
08-03-2016 01:16 AM
The DataFileLoad command has a second parameter where you can specify your plugin.
Your Code should look like this:
Option Explicit if "IDOk" = FileDlgShow(DataReadPath, "Thermotron_CSV,*.csv|TDM Files,*.tdm|DAT Files,*.dat|All Files, *.*", "Data selection", True) then For iCount = 0 To Ubound(FileDlgNameList) Call DataFileLoad(FileDlgNameList(iCount), "Thermotron_CSV") Next end if
08-03-2016 02:21 AM
I have seen that you had multiple filters.
The following code can be used for this. There is also the ability to figure out the selected filter.
Option Explicit if "IDOk" = FileNameGet("ANY", "FileRead", DataReadPath, "Thermotron_CSV,*.csv,TDM Files,*.tdm,DAT Files,*.dat,All Files, *.*", "All.lst", True, "Data selection") then Dim MyFileNames : MyFileNames = Split(FileDlgFileName,"|") dim filePath : For each filepath in MyFileNames select case UCASE(FileDlgExt) case ".TDM" Call DataFileLoad(filePath, "TDM") case ".DAT" Call DataFileLoad(filePath , "DAT") case ".CSV" Call DataFileLoad(filePath, "Thermotron_CSV") Case Else DataFileLoad(filePath) end select Next end if
08-03-2016 11:42 AM
This is perfect. Thank you so much again for your help !!!