How to add dependent Input items in Inputbox?

Is that possible to edit dependent input items with Ruby in Sketchup?

for example, choose A in the first input field. the second input field can show different lists to be chosen. Or choose B in the first, the second input field will be deactivated.

Or could it be realized with WebDialog or SketchUp SDK ?

You need a WebDialog or HTMLdialog to achieve this.
But it’s a lot more complicated that writing a simple UI.inputbox() or two…

Otherwise, for very simple choices you could consider using two inputboxes.
So inputbox1 has a dropdown list and the user chooses option A and OKs, then inputbox2 opens automatically offering the dropdown subsidiary choices relevant to option A. If option B has no subsidiary choices then there is no inputbox2 needed, if the choices are different your inputbox2 uses a different dropdown list…

2 Likes

Try two inputboxes! Believe me, a. WebDialog or HTMLDialog, while much more capable, is horrendously more difficult to create!

1 Like

Thank you for your advice!

And perhaps I have to develop something using WebDialog. The Problem is if our insitute supply only SketchUp 8, in which only WebDialog is supported. If we develop a Plugin using WebDialog, can it runned by ohters who use new versions of SketchUp with HtmlDialog?

Thank you for the advice!

Later versions of SU run Web Dialogs fine. I have one (developed with huge help from Steve Baumgartner) which works perfectly fine in SU 2017, in which HTML Dialogs were introduced.

any tutorial for the establishment of a WebDialog? Only the API Documentation seems not enough. Thank you!

Of course not. It’s a reference not a teaching tool.


Refer to the learning wiki: