This is a two part tutorial on how to read values from Excel into Grasshopper.
Part 1 will describe a technique for reading excel data through a CSV file and extracting the various values into data lists for you to work with.
Part 2 will apply this to a parametric bench example that has variables to control several profiles.
I have attached a grasshopper file and a CSV file for this demonstration. In the second part, I will demonstrate a method of having a user friendly interface in Excel.
The basic process:
- Read CSV files and extract each variable set as a branch
- Graft the variable lists to allow each profile to use its related variables
- Construct profiles based on moving points and variable values
- Loft to form bench
- Update Excel > Save as CSV > See changes
I have included two grasshopper rigs – The parametric bench with sliders and the parametric bench with excel link.
With the Sliders, you can link in to Galapagos if you have a fitness function. You can also tweak and sculpt the bench on the spot.
With the Excel, you may apply macros and functions to provide mathematical control over your profile shapes. Also a slight tweaking of the grasshopper file will allow the number of profiles to be dependent on how many entries there are in Excel. (Calculate number of rows in Excel, bring that in as a value, divide a line by that number to get your profile origin points).