scripting commands and spreadsheet
I would like to write an applet where a script creates some objects based on the data in the spreadsheet, but I'm not really sure how to go about it.
My final goal is to have a script that creates the 3D model for a molecule.
It is not hard to create a single model by introducing each individual atom and bond manually, but it is going to be pretty tedious for molecules that are not very simple.
The script I have in mind should inspect the spreadsheet for data and create spheres and cylinders accordingly.
I am clear on the structure of the data and on all the checks, but I'm not sure about other, perhaps more basic, things
- where should I write the script, considering that before reading the spreadsheet there is no object around? It seems to me that a script can be only "attached" to an object.
- is there a list of commands for interacting with the spreadsheet? I expect that, other than reading the cell content, I would need to check for the number of nonempty rows, and for the number of nonempty cells in a row.
I'm not sure that what I have in mind can be done with geogebra.
Another possibility is to write the data directly in the script, as opposed to reading it from the spreadsheet. The two questions I asked above would still need answering, except for the bit about reading from the spreadsheet.
If possible I'd like to go with my first option, though (script+spreadsheet in geogebra).
Thanks a lot for any input.