algorithmic modeling for Rhino
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.).
Comment
Thank you for the useful component.
Hm. I've never seen those characters before. What text editor are you using?
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.
Philippe – I've never tried using this particular script with a CIX file. Do you mind posting the file so I can take a look?
tsaohy – What .gcode are you referring to? This is a Python code that only requires the GHPython scripting component.
Are you trying to write a .gcode file with this script?
/SPM
Hey Patrick, mind posting your file so I can take a look? Or shoot me a DM with the file.
/SPM
This would be really useful to me because I am doing some operations that max out the panel character limit. I've tried writing to excel, but there again hit cell character limits, so I really need to be able to write a text file directly. I seem to be getting encoding errors though:
1. Solution exception:'ascii' codec can't encode character '\u2019' in position 54
thanks Stephen.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!