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

    Change one instance of a component

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    17 Posts 2 Posters 1.4k Views 2 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.
    • GaieusG Offline
      Gaieus
      last edited by

      @pout said:

      so in that case you:

      1. edit an instance so that it has no color/material definition
      2. this results in all other linked instances to also lose their color/material definition
      3. recolor the instances but instead of on entity level, do it on component level.

      Yes, exactly.

      @unknownuser said:

      What about the solution we were thinking about, can we somewhere edit the component linking so we can set another component as the basic component?

      I'm not sure I can follow this. The link betwen the components either exists or doesn't at all (in this case you need to make certain component(s) unique but you can never reinstate that link again).

      You can also use several components nested in other components or groups as well so the whole system is quite flexible.

      Gai...

      1 Reply Last reply Reply Quote 0
      • P Offline
        Pout
        last edited by

        well what we are looking for is this:

        Somewhere there has to be defined that an instance is based upon a component. You can see that name in Entity info.
        Now for example
        We have 3 boxes which are instances of the same component.
        Now we copy one of those boxes and make it a new component with the color red.
        So we now still have 3 instances from the same component and one other, new component/instance who is exactly the same except color/material.

        Let's say that we want to make one of the 3 instances an instance of the copied component. So, we would like to edit the component-link information.
        That way in the end we would have 2 instances from the basic component and 2 instances of the copied component.

        The question is: where is it defined on what component an instance is based and can this be edited.

        Instance A--> base is component A
        Instance B--> base is component A

        Instance C--> base is component B
        Instance D--> base is component B

        Where are those links defined and are they available for editting?

        btw thanks alot for helping me on this πŸ˜„

        1 Reply Last reply Reply Quote 0
        • GaieusG Offline
          Gaieus
          last edited by

          OK, I see.

          Now if you have three instances of the same component and you insert a fourth one which you paint from outside, it will still remain an instance of the original component (i.e. you don't have a new component definition). You can check; in the omponent browser there will only be one component (and top of all; unpainted).

          A component definition is stored within the component; that's the geometry itself (only SU has to remember this definition just once); and within each component since it is all the same if you edit this one or the other one; all instances will reflect the changes.

          Now if you want to create a new component with an independent definition, you have to make it unique (different from the previous definition). later on you can save this as an skp file and select whichever component you want to define as such and reload them from this external file (as I described above).

          Note however that these reloaded components won't inherit the attributes you assign to the original from outside of their context.

          So you use either this method or the other but you cannot "mix" them.

          To be honest, with a more concrete exmple (if you are allowed to share it) it could be made much more obvious.

          Gai...

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pout
            last edited by

            i'll try to give a 'written' concrete example:

            An apartement building. All columns are based upon the same component.

            Now i want one instance (column) to recieve a different color. Temporary, for analysing purposes.
            I don't want it to become a unique component or what so ever. When i hit a button it should be in it's original color again.

            Now when the individual elements in the component did not get a color/material before the component was created there is no problem. I can change the color/material just of that instance to red. The others stay how they were.

            But, when the individual elements in the component did get a color/material before the component was created there is a problem. To change the color of the column i want i need to go into the component and edit. This results in all instances (all columns) turning red.

            To solve this problem we were thinking about copying the component and making it unique and give it the color red. This has no influence, we just created a new component(column) with the same characteristics as the others except it is red.
            Now if we could define that, temporary, the column we want to be in red is an instance of the newly created component the problem is solved. Then this column is not anymore an instance of the original, colorless component but an instance of the new red component.
            Later (after hitting the button) this column should become an instance of the original, colorless component again.

            That's the theory. We now just need to know how we can alter (in code/ruby) that that specific column is now an instance of the red column component and then an instance of the original colourless component.

            I hope i make sense, as always i have it in my head but writing it down is harder.
            Off course i can imagine there are other , better ways to do this. So if you have an idea, please let me know.

            thx again πŸ˜„

            1 Reply Last reply Reply Quote 0
            • GaieusG Offline
              Gaieus
              last edited by

              OK, it makes sense.
              How about this:

              1. You creat a layerA for the red component.
              2. you create another layerB for the component instance of the one you want to toggle red/original.
              3. now you create two scenes; in scene1 you have all the original instances displayed including the one on Layer B while layer A is hidden
              4. in scene 2 you have the original instances displayed except for the one on layerB and of course layer A is also displayed.
                By clicking between the two scenes, you can display any changes like this. A way easier method than reloading and returning to previous definitions.

              Is this for some presentation purposes mainly? Because if not, other approaches might be more useul.

              Gai...

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pout
                last edited by

                ok thats sounds perfect.
                but as you can imagine, if you want to do this seperately for each column you would have a huge amount of layers and a list next to your pc when you need to hide/unhide what layer in what scene.

                The fact a instance should be red or in it's original color is based upon a result of a script.
                So all instances should have the possibility to become red or not...

                That's why we came up with the 'red version of a component' idea. If we could swap the link between instance and component based upon the script result we have a solid method to use without having to play with layers/scenes etc.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pout
                  last edited by

                  James, also thx for the feedback πŸ˜„

                  1 Reply Last reply Reply Quote 0
                  • GaieusG Offline
                    Gaieus
                    last edited by

                    Well, you can always make a plugin requet (maybe with a link to this discussion) in the Ruby Discussion here. Try to be as specific as you can to explain the Gurus down there what you exactly want to achive and watch...
                    πŸ˜‰

                    Gai...

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      Pout
                      last edited by

                      thanks a lot! All help is really appreciated.

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        Pout
                        last edited by

                        continued here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=13901

                        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