How to use open file dialog window in Ruby SketchUp?

Hi, I want to use open file dialog window in ruby sketchup. does anyone know how to do that in sketchup?

I cannot install tk using gem through Ruby console which sketchup already has.like:
gem install tk

why not use the builtin method?

chosen_image = UI.openpanel("Open CAD File", "c:/", "DXF|*.dxf|DWG|*.dwg||")

john

2 Likes

Thank you john. That is brilliant!

I didn’t notice it when I was looking at API.

2 Likes