Page 1 of 1

Macro for writing to a CSV

PostPosted: Tue Sep 24, 2024 6:37 am
by Gilias
Hello,

Can I write tool data to a CSV file using a macro?

I would like to monitor my tools and their lifespan using a CSV file. By writing to and reading from the CSV file, the lifespan should be tracked. Once the lifespan is reached, a message should appear on the screen.

Re: Macro for writing to a CSV

PostPosted: Thu Sep 26, 2024 12:26 am
by eabrust
Hi Gilias,

Here's a few threads that will give some info on how to write to text file from a macro:

http://www.forum.cncdrive.com/viewtopic.php?f=11&t=3437&p=25052&hilit=write+text#p25052

and

http://www.forum.cncdrive.com/viewtopic.php?f=11&t=4586&p=31347&hilit=write+text#p31347

You'll have to workout the gathering of the tool info from variables, then just make sure you save a comma between all your items and save the file w/ a '.csv' extension.

regards
Eric

Re: Macro for writing to a CSV

PostPosted: Thu Sep 26, 2024 7:32 am
by Gilias
Thank you for the information; that already helps a lot!

This is more about writing to text files, but is it also possible to read from these files?