1

I have a ruby script for SketchUp 8 which collects data and needs to write it into a csv file. When the code creates the csv file, I want an inputbox to show up which asks for the filename and directory to save too.

Does anyone know how to create an inputbox with the 'browse directory' option?

Ruts
  • 286
  • 1
  • 18

1 Answers1

2

UI.inputbox is a very simple and limited API method - it only allow textbox input and dropdown selectionbox input as described in the API docs: http://ruby.sketchup.com/UI.html#inputbox-class_method

But there are other methods for opening the file dialogs:

There are no further customization offered than what is described in the API docs.

If you need to design you own custom dialog then you have to resort to either webdialogs (http://www.sketchup.com/intl/en/developer/docs/ourdoc/webdialog - https://github.com/thomthom/sketchup-webdialogs-the-lost-manual) or making your own Ruby C Extension and make system calls natively (https://github.com/SketchUp/ruby-c-extension-examples).

thomthom
  • 2,854
  • 1
  • 23
  • 53