sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Editable Component?

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 222 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      scetchnscribble
      last edited by

      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

      😎

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Have you looked at Dynamic Components? Sounds like they might do what you describe.

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • S Offline
          scetchnscribble
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            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

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • S Offline
              scetchnscribble
              last edited by

              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... 😲

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by

                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

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement