sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Global attributes

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    10 Posts 3 Posters 8.8k 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.
    • O Offline
      Orionis98
      last edited by

      I'm starting to study DCs, with a quite good knowledge in programming with different languages.
      My question, made simple: is there a way to have some global attribute in a scene?

      I made a number of kitchen dynamic components (I'm sure this is common starting point, all with their own attributes for materials.
      It is boring to select each single element just to change colors, so I wonder if I can define somewhere in an upper level the materials to be referenced globally by all the elements.
      This is also to avoid to create a list of materials for each elements.
      I thought to use 'Choose' with an index inherited from a 'global' array, but where and how?

      Hope this is clear, thanks

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

        You could create a group or component called kitchen, then build or place components in this environment. "Kitchen" would hold the global attributes. So newly inserted cabinet DCs will read with attributes =parent!.... and update. You could save this file as a template.

        1 Reply Last reply Reply Quote 0
        • O Offline
          Orionis98
          last edited by

          @pcmoor said:

          You could create a group or component called kitchen, then build or place components in this environment. "Kitchen" would hold the global attributes. So newly inserted cabinet DCs will read with attributes =parent!.... and update. You could save this file as a template.

          Thanks for the answer; this was my original idea, but I find it an impractical solutions because you have to deal with a new 'macro' component to be exploded for any change to one of its sub components.

          I hoped there was a way to define some out-of-context attributes.
          If there aren't, I will adopt what you suggest.

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

            @orionis98 said:

            I hoped there was a way to define some out-of-context attributes.

            There are techniques of achieving this
            sample attached where one can choose the default (global) or own input for a bench top


            build 1.skp

            1 Reply Last reply Reply Quote 0
            • O Offline
              Orionis98
              last edited by

              @pcmoor said:

              @orionis98 said:

              I hoped there was a way to define some out-of-context attributes.

              There are techniques of achieving this
              sample attached where one can choose the default (global) or own input for a bench top

              Thanks again for your support; unfortunately I have SU 2016 and can not open your file.

              I would ask you another question (I might open a new topic, eventually): following a 'plain' approach, thus assemble a macro component to drive all the real elements, I still have a very boring issue: with tens of material selectors (at least 2 for each element, plus the globals ones) I have to declare a list of materials (the same) for each.
              Is there any way to 'copy & paste' the list from one component to another one?

              Thanks again
              Giacomo

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

                Giacomo,
                I downgraded the file to 2016
                To copy and paste you need to use attribute inspector from the extension warehouse or
                https://sketchucation.com/pluginstore?listtype=1&author=0&category=0&search=attribute+inspector&submit=%3F

                then find the _option in the dynamic attributes,you will see that have URI formatting. Copy & paste the values using control c,v, You need to remove an "&" to add on further copied values

                One can use an excel macro to read and convert a list too

                https://www.youtube.com/watch?v=O4gcm8HXLV0 shows the use of the macro and Attribute Inspector

                you need to private message your email to get the excel macro, as can not load to this forum


                build 1.skp

                1 Reply Last reply Reply Quote 0
                • O Offline
                  Orionis98
                  last edited by

                  @pcmoor said:

                  Giacomo,
                  I downgraded the file to 2016
                  To copy and paste you need to use attribute inspector from the extension warehouse or
                  https://sketchucation.com/pluginstore?listtype=1&author=0&category=0&search=attribute+inspector&submit=%3F

                  then find the _option in the dynamic attributes,you will see that have URI formatting. Copy & paste the values using control c,v, You need to remove an "&" to add on further copied values

                  One can use an excel macro to read and convert a list too

                  https://www.youtube.com/watch?v=O4gcm8HXLV0 shows the use of the macro and Attribute Inspector

                  you need to private message your email to get the excel macro, as can not load to this forum

                  I will study and test your material in the next days; I'm sure they will help a lot.
                  Thanks for your excellent support
                  Giacomo

                  1 Reply Last reply Reply Quote 0
                  • pbacotP Offline
                    pbacot
                    last edited by

                    I don't know if this works in your setup or dynamic components for that matter. And I suspect it is no good if you are outputing the chosen material (color) in some bill of materials... But I use
                    "Material Replacer" to globally change a material in a model.

                    MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                      @pbacot said:

                      "Material Replacer"

                      I believe this is an excellent idea, it works well with DCs, provide you first initialize the material. Reports okay too. I will adopt this in my workflow. Thanks!

                      1 Reply Last reply Reply Quote 0
                      • O Offline
                        Orionis98
                        last edited by

                        @pbacot said:

                        I don't know if this works in your setup or dynamic components for that matter. And I suspect it is no good if you are outputing the chosen material (color) in some bill of materials... But I use
                        "Material Replacer" to globally change a material in a model.

                        Thanks for the hint; I'm sure it is very usefull, but at the moment I suspect to have a serious performancies issue, for which I will post right now in a new topic.
                        Giacomo

                        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