Output Text ?
-
Hello all,
I'll cut right to the chase... I have written a gardening script for SketchUp that requires input of user preferences (veggies, path widths etc.) to determine garden layout. The user gets a graphical representation of their layout, and in addition I would like to be able to write text to a .txt file or .xls file or something so that the user has their information from the graphic available to print out or just view in a straightforward written manner.
Does anyone know of a way that I could achieve this? Even to be able to write within SketchUp (not in the console, but on the image) would improve my situation greatly.Thanks in advance,
laura -
What about entities.add_text. That puts a text object into the model. You can place it wherever you would like.
What types of things are you wanting to label?
Chris
-
With a webdialog you can make it like a web site popup; you can have text, images and links to nurseries, wiki entries and so on ... and so on.
-
Thank you Chris...and Chris for replying!
I'll try to be a bit more clear about what I need to convey to the user:
The user will input preferences (vegetables, path widths, etc.)from dropdown menus in a few input boxes that will pop up. Because this is user-specific and I would like the script to be as user-friendly as possible I would like to output a user-specific table with things like planting times, harvesting times, vegetable symbol/colour (to use with the garden graphic), etc.
for the user to be able to use as a reference.
I will have all the information stored in a hash database in my script, your Entities.add_text comment made me wonder: is there anything fancy i can do with entity info if i label everything? (I apologize if this is a dumb question, I just thought I'd ask )Thanks for any feedback!!
laura -
I think you could tackle this in many ways.
Chris's suggestion of a webdialog might be the best place to start. You could send all your planting info to an html table, and have the web dialog display it all. The user would end up with a nice table, organized by plant, that shows how much water each plant needs, when to fertilize, when to prune, when to chop way back, how much sun it needs, etc. You can send as much detail to it as you would like.
You could also include all this info in your model, and attach each's plants attributes to the plant component. Then make a simple tool that allows the user to click on a plant and it could bring up a message box or webdialog that shows just the info for that plant.
If you implement both methds, you give the user the ability to click on a plant to determine what kind of plant it is if they do not know. And it shows just the info for that plant. And if you also create the over-all complete table option, then they can get a more detailed look at their entire garden. So both, together, would be quite powerful.
Sounds like a great tool you're working on.
Chris
-
Thanks Chris for the wonderful advice...I'll try to get on it. But don't be surprised if you see a post from me soon on how to accomplish some of this stuff!
Thanks again!
laura -
Hope you find this starter prototype webdialog from this topic useful. Hopefully, criticism from the experts and requests for help from those starting out will develop it into something useful for interested SCF members and others.
Chris 1 (I'm older)
-
@tpoz said:
is there anything fancy i can do with entity info if i label everything?
On the serious side, you could do a shade analysis to see if the plants are goig to gt enough Sun.
How about blending the color of the tomatoes from green to red as time passes?
http://code.google.com/apis/sketchup/docs/ourdoc/color.html#blendOr (making the plants "grow" (scaling the plant size) as the growing season progresses?
Sounds like a fun application of SketchUp!
Advertisement