sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Changing Components in a website

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    16 Posts 5 Posters 2.8k Views 5 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      Interesting. If he is doing it ouitside of SU, then it sounds like he is opening the .skp file in some otherapplication and doing it there. Which seems odd.

      Is there a reason you can't load the model invisibly into the users computer and then manipulate it there?

      Chris

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

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        It's not done on the server - the server just sends the Ruby code to SketchUp where the code is executed to create the component.

        The server-side application builds the Ruby code from your selections.

        Hi

        1 Reply Last reply Reply Quote 0
        • E Offline
          ericschimel
          last edited by

          Ahh, that makes sense....

          Would there be a way for this to work with Dynamic Components?

          I would like the user to be able to select a DC from a website, configure options that were built into the DC, and then have it delivered to sketchup as a "dumb" component.....

          -Eric
          http://plugin.sketchthis.net
          Sketchup Kitchen Design Plugin
          Custom Models

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

            Does it really need to be dynamic using the existing dynamic tools? I don't think you could 100% safely put the dynamic component into the SU as completely hidden, change the attributes, explode it, and then show it.

            I think during that process they would proabably be able to figure out a way to save the component out as dynamic if they really wanted to.

            But you could program the component through ruby in such a way that they do not really ever get any dynamic component, but a bunch of non-dynamic blocks that your ruby assembles as desired.

            I think it works. How big of a deal is it for the user to not get their hands on your dynamic component?

            Chris

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

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

              Well, you don't want this to work with DC since you want a "dumb" component.

              What I imagine you want is, the website let you pick and select the various combinations of components - then send the configuration data to ruby which load each component and assemble them into the arrangements specified.

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

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

                So you have on your server all the component parts. Plain "dumb" components - not DC's.
                Then you set up a list of various combinations - url to component, position and scale.
                That configuration is sent to ruby, which loads all the parts using the URL given, and then position and scale it.

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

                1 Reply Last reply Reply Quote 0
                • E Offline
                  ericschimel
                  last edited by

                  I think I understand what your saying, the downside for me would be creating each component using a ruby script, rather then the built in DC process. I would think that would make life difficult for me, as I would want to add, and change all the components on the website with ease....

                  I would, if possible, have a nice DC sitting on the server, that I was able to create and test in my local Sketchup. The user would be able to configure it on the website, and then have it inserted as say a "dumb" su6 component...

                  -Eric
                  http://plugin.sketchthis.net
                  Sketchup Kitchen Design Plugin
                  Custom Models

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

                    Unfortunately, the server can not do that as it would require the server being able to open Sketchup and run ruby scripts and open components all on its own.

                    And if you plan on using a DC, you still have to rebuild the entire Dynamic Component Ruby script, since you will not be able to use it. So all the menus and such?, you will have to interpert that into your script. I think the DC route is considerably more complicated.

                    Do you have any actual real world examples you are allowed to share?

                    Chris

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

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by

                      If you want to talk about possibilities - it is possible using the SDK (not Ruby API) to write a server-side program that manipulates .skp files directly before sending them to SketchUp. That's beyond my knowledge at the moment.

                      Another possibility is to send the full-featured component to SketchUp and dumb it down as soon as it is imported.

                      Another possibility would be to send a blank "DC" component, and then build up the dynamic attributes from the user's options. (by blank, I mean devoid of dynamic attributes, not devoid of geometry.)

                      (I'm using "send" rather loosely - the actual sequence would be closer to: user selects options in a WebDialog, then hits "Get Component" button. Server sends a message to Sketchup saying "import a component from this location: here. Finally, SU responds to the message by importing the component.)

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jim
                        last edited by

                        All of a DC's Dynamic parts are stored as strings in an attribute dictionary. You can create a complete dynamic component using Ruby .set_attribute if you know the correct strings to write.

                        Hi

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

                          Question is, how are you expecting this to work for you, as the designer of the components? Are you looking for something that let you just create a DC and have the server read and interpret how the DC is configured and offer a custom UI to the user of the website that will in return build a "dumb" component?

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

                          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