10-19-2017 04:31 PM - edited 10-19-2017 04:55 PM
Here's what I'm looking to do.
1) Point DIAdem to a folder
2) Load first TDM
3) Perform Calculation
4) Save and close TDM
5) Load next TDM, and repeat for every TDM in the folder
I've come up with a script that I believe works, however it runs very slow. Is there anything I can do to speed it up?
Dim File, iCount, Directory '-- Set Directory Path Directory = "C:\_Processed Data" '-- Load All TDM Files from Directory File = DirListGet(Directory, "*.TDM", "filename", "FullFilenames") For iCount = LBound(File) To UBound(File) Call DataFileLoad(File(iCount)) '-- Calculations Call ChnIntegrate("[1]/Time","[1]/Pelvis RY","[1]/Pelvis Rotation RY","TrapezoidalRule",0,0,0) '-- Save and Clear Call DataFileSave(Directory&"\"&Data.Root.Name&".TDM","TDM") Call Data.Root.Clear() Next
Solved! Go to Solution.
10-20-2017 10:01 AM
Hi Tamer,
Your script looks OK to me. If you want to know where your execution bottlenecks are, I suggest you turn on the Script Profiler in the SCRIPT panel and re-run your script. It will give you a command-by-command breakdown of where your script is spending its time.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
10-20-2017 10:26 AM
Thanks Brad