new user to Bentley generative Components. i am trying to explore how to write to excel say set of coordinates from existing elements/cell. i have managed to read from excel thanks to various support from users in this forum. however im having trouble writing to excel. i have done quite a lot of such similar activities in Revit Dynamo side, but in GC i am finding it difficult to write to excel. i have attached an image below for reference.
Could someone please point out as to how the data / value structure should be say coordinates XYZ to be written to excel or even just X values or any value for that matter. do i need to flatten the list ? if so how can i do that. any help would be appreciated. some reference or snapshot as examples would also help
First of all welcome to the Generative Components. The workflow related to Write to excel is simple when it comes to GC. In the attached DGN file, you will notice that i have created some random points in space. Those points have XYZ co-ordinate with that. You will be able to see the XYZ values from the output of the points node. Those XYZ values we will use to write in Excel. I hope this helps you.
thanks for the reply, but the file when opened does not seem to have any data. generative design says no elements found.
i have added few points manually & then tried to export them but having issues. snapshot attached for reference. Could you please let me know what am i doing wrong here. excel file is just a new excel, 'Sheet1' is name & range being 'A0:A4' or how should the range be in case i have to write it column wise or row wise. or the list needs flattening or transpose.
appreciate if you can guide me. Thanks
What version of GC you are using and with which application. Also one thing i have noticed, you have used 'A0:A4', in excel there is no column or row with 0 as index. So if you are using 4 points then use 'A1:A4'. Then only it will work. The Range Address is whatever we see in Excel.
The GCT file of the previous file is attached. Hope this helps you.WriteToExcel.gct
thanks a lot now i understood the mistake i was making. now i managed to pass transposed list XYZ to excel rows & columns .
by the way i am using update 3 version 10 .
Along with Alifur, I would like to add the Excel Range dimension should be the same as the dimension of the value list. For example in your first screenshot, the value list is of higher dimension probably of rank 3 but excel only takes 2-dimensional value.