Editable Component?
-
I'm interested in learning how to create a component that, when clicked, will allow me to edit user input variables.
example:
I run a script.
It prompts me to input the following: Length, Width, Depth
When I click 'OK' it creates the box as a component.I want to be able to right click the component, edit the Length, Width, and Depth and have it adjust the component accordingly.
Any simple and well written examples?
Thanks in advance
-
Have you looked at Dynamic Components? Sounds like they might do what you describe.
-
ah ok, I don't have SketchUp 7 but maybe i should give it a test run.
How complicated can one get with dynamic components? Can I create a window as a dynamic component and edit the width, height, trim & wall thickness? This involves a lot of drawing, pushing & pulling. I've watched some video tutorials but, I am not sure how complicate a user can actually get.
At the moment i have written a script that prompts me with an input dialog. I input the variables and it creates the window as a group. I just figured it would be easier to be able to create one and edit it by right clicking.
-
If you already are using fairly succesfully, I'd say keep with Ruby. It will be much more flexible in the end.
And if you just want windows, have you seen the Windowizer script already out there? Its pretty darn good.
Chris
-
I feel that I have written a fairly successful script so far. I just want to be able to edit the variables when right clicking. I know its possible I just don't know how much scripting is involved and what exactly I should be doing. I've worked with many different languages but I'm fairly new to Ruby. I understand the concepts but executing it in ruby has been a little more difficult.
I love spending my free time analyzing scripts, but every so often it still looks like a bunch of chaos and disarray...
-
You will need to create a tool class that lets you right click on a component. Then it should check that component to see if it is one of yours, probably by checking for an attribute_dictionary that should put on your special components.
I'll write up a quick example of how to amke a tool that right clicks,
Chris
Advertisement