Lately I've found myself jotting down and formatting notes in Grasshopper then exporting to a text file. (If this is strange to you, I understand completely.) So I've written a quick script making that workflow a bit easier. I know there are other codes out there, but I thought it might be interesting to share nonetheless.
There are some simple built-in safety protocols. It checks for an existing file path first then proceeds with the exporting process. If the specified file contains data the user is prompted with a warning, asking him/her to allow an overwrite or specify a new path.
It also works with CSV files. You will need GHPython.
You're welcome to download it here. Image of it in use below.
Best,
/SPM
EDIT 05/2016: The above file now includes the latest script with the additional functions (append, relative path, etc.).
Philippe HAMON
Thank you for your answer, CIX is an extension for Biesse woodworking CNC machines, but in reality it's a simple text file, your export grasshopper component adds an annoying "CR" character. Finally I found another GH component which directly writes the text file with the CIX extension and without the "CR" character, it looks more suitable for my needs.
Jun 25, 2017
Stephen Maher
Hm. I've never seen those characters before. What text editor are you using?
Jun 30, 2017
Francesco De Luca
Thank you for the useful component.
Aug 14, 2019