I am both new to Grasshopper and Python but I am working on a rather complex set of steps: I am looking to pull data from a specific sheet of an excel workbook, and have it update a grasshopper instance (long term probably develop it into a component for Tekla Structures) and then have it update a Tekla structures model when the workbook is updated. Ideally I would also want to back-feed the Tekla data into said workbook if the modeled objects get updated in Tekla as well.
As of writing this, I have been able to pull data from the workbook sheet I want, explode a data tree into the different pieces and then manually assign each piece to a Tekla object in grasshopper and have it create said object in the Tekla model. As you can imagine this is not realistic to do this for hundreds or thousands of objects as I will ultimately need to be able to do. The more I have dug into it, I am thinking using Rhino 8 with ability to utilize python 3 scripts will be the most efficient way to automate this using something like openpyxl.
Currently I am working on the back feeding process and getting stuck on how to pull the start and end coordinates of a beam, plate, etc. out of Tekla. Any and all suggestions or help on this part or the whole process would be greatly appreciated!
I would recommend using the Lunchbox plugin for grasshopper to read from Excel files but your solution with python might be faster, worth a speed comparison.
Go to Rhino–>Tools–>Package Manager–> Search for Lunchbox and then click install
Not sure what you mean by exploding data tree, usually that’s not what you want to do but it’s very hard to paint a picture of your workflow without an example GH file. You should be able to do what you want without python coding, You could possibly make it more efficient with python later down the line however.
I have been testing out both the Lunchbox and TTToolbox excel plugins to import/export in Grasshopper. Attached to this are a sample csv and a copy of the .gh I have been using to try to proof-of-concept what I’ve been trying to do. Thanks!
I’m searching for the header that I want to retrieve instead of plugging in an index. Probably better ways but it all depends on how your file will look like and how you want to separate each category.
I would also recommend modelling closer to 0,0,0 in Tekla and then setting up a Project Base Point to get the correct coordinates when you later export back to wherever the data is going.
Better to use a known point to plug into A rather then what I have done, but you get the gist.
Would you be able to post your GH for me to reference directly? I am still very new to GH and still learning all the different icons and tools. Additionally, could you provide some guidance for pulling coordinate points out of Tekla into GH? I have not yet found a way to export that portion of Tekla data.