Prompting user to select objects while running script
-
I am trying to make a plugin in which I need selection inputs from the user.
Atually I need to be able as a user to select one group in sketchup (via mouse clicking), name it somewhat in ruby,
then select another group (via mouse clicking again) and give it another name in ruby, so I can go on with calculations, manipulating geometry etc.
How is this possible? I really tried to find out on my own but I didnt come up with a solution in the resourses that I have by far.
I see plugins that when they run, they prompt the user to select stuff, even show graphic previews of the result, etc.
I cant realize how this can be coded...
Any help - explanations - resources - tutorials - references would be great! -
Sounds like you need to implement a custom Tool: http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool
You can make the tool select entities the user clicks on by using the PickHelper class.
Both these classes has examples in the documentation that will get you started.
Advertisement