I have been searching around for a while and have not found anything that works for me. I have a GH that creates an item from an engineering provided spreadsheet. I also have a few layout sheets that provide 2d documentation from that 3d model. Each of those layouts contains a table with data in cells that correspond to specific ranges in the engineering spreadsheet. I would like to automate the layouts to include the .xlsx data in that table. If the spreadsheet changes a new file is created so the link is only one way.
I have a matrix in Grasshopper that is exactly what I want into the layout. I just can’t figure how to get that data into the layout appropriately.
It appears one cannot send grasshopper objects directly to a layout. Is this true?
I have succeeded in setting an array of points for the various text objects in model view then using that in a view on layout. I don’t like cluttering up my model space with that kind of data but it works for now.
I had seen that thread previously. Fab Tools does not suit my purpose. Nor do I want to create a proper CSV derivation of the engineering spreadsheet that is driving the core of the model at present. I just need that same engineering data visible in the layout.
I might be able to help, if I know exactly what you need. It wasn’t completely clear from your post. Do you want to generate something in gh, or was this your attempted workaround and do you just want to have a table on a layout page that updates with a change of an excel sheet?
I have a large engineering spreadsheet within which a range of about 40 cells is used to size the basis of a product. 2 columns and 20 rows. The layout documenting the finished design needs to include the spreadsheet data in a table. Once published, this layout table data does not change. Surface features and designs may change but the core remains per the engineering data. If the engineering data changes, a new model is generated with a new layout set.
I’ve got that working perfectly, via grasshopper in model space, to generate the foundation from the spreadsheet. I can select a tab in the spreadsheet for the different size items. The rows and columns are the same tab to tab. I just need that table in the layout. I was thinking I could do something similar with Grasshopper to get the table to layout.
I don’t care if it is Grasshopper or a script under a button. I was experimenting and learning python / winforms a few years ago. But I have since been working just with Grasshopper. I have a sense that taking the Grasshopper scripts to Python/WinForms is the more robust solution for these issues as they need to move out into the enterprise. Part of what I am tasked with is to create tools to standardize and streamline the design and documentation process.
I’ve briefly looked into it, but it seems there aren’t many options in ironpython to work with xslx files. I’ve found openpyxl, but as far as I know that does not work with ironpython. Easiest route would be to use .csv
Why is it a problem to use .csv?
I messed with this one a bit and got it working to propagate on layouts or in model space.
The one thing it needs is to integrate Annotation Styles text size vs an override (so that you can leave scale to layouts checked & have one in model, one in paper if need be)
Going from the engineering XLSX to a few cols of CSV with the proper delimiters is just one more opportunity for things to get sideways. I can be rigorous but a half dozen others speaking different languages can be problematical.
Just to mix things up a bit. Since the data is in your speadsheet, why not use VBA in excel to drive rhino rather than python with intermediate files cluttering up. Ok you still have to format the table data which can be done with the string functions. There is no real need to use Grasshopper as all your design decisions are already done in the spreadshee.
Not sure if this will help anyone but I have been trying to streamline and automate Rhino drafting and layouts in a template with excel spreadsheets. The formatting is a bit of a problem in the pdf to Rhino, but if you use the save as pdf in excel the table formatting will transfer to Rhino and you can update the linked pdf ln excel and repeat as required.
H Japhy and RBL.
I am not doing any formatting or scaling. I tried printing pdfs from excel with different pdf printers but always got formatting issues in Rhino with it not tabulating the text correctly.
I think the native excel pdf locks the formatting in. I have changed and updated the blocks and they are working and formatted correctly as a table. I will do all my scheduled with excel and I a keynote system.