sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Plugin for DC's

    Scheduled Pinned Locked Moved Plugins
    7 Posts 4 Posters 1.1k Views 4 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.
    • P Offline
      peweuk
      last edited by

      I have a number of dynamic components which all have the 'Material' attribute accessed for change using the component options panel, where the material code can be entered manually.

      However I can have over 30 of components in a model and if I want to change the colour of them all (to the same colour) I have to do them one at a time.

      Does anyone know if it would be possible to have a plugin writtten which would allow the colour (Material attribute) to be changed for all (or a group of selected) components?

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

        Yes that would be possible.

        Chris

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

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

          Thanks Chris, that is hopeful.

          Now I need to find someone to write it for me - anyone suggestions as to how I might find them?

          1 Reply Last reply Reply Quote 0
          • D Offline
            davidlouis
            last edited by

            Hi peweuk

            Not that i'm an expert at all on the scripting side but i have managed to solve your problem by creating a new 'blank container' component and then inserting the dynamic component into this component... in effect a nested dynamic component. From my experimenting, when one changes the dynamic component's colour options, all the instances of the dynamic component will change colour accordingly. Further still you can use the 'make unique' command on the 'blank container' component to isolate a number of those copies at a later stage if you would like to have two or more instances of colour.

            I appreciate that this is easy if starting from scratch, but i guess you could manage to apply this to your existing model by replacing said dynamic components with a separately and newly created single instance of the container component, created as described above in a new file, and then use the 'reload' component command to bring the option of global colour change into your existing model.

            I've attached a file to this post in which i was messing around with your request on a DC from the 3d warehouse with the built in option of colour change and it seems to work! Please note that i have two sets of the same DC in operation to demonstrate that you can have two colour options ('semi-global') at the same time.

            So if a good samaritan doesn't answer your call to write a script you can always try this way!

            Hope this helps...

            Cheers
            Dave


            DC test.skp

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

              Dave,

              Thanks for your time and input.

              Your example was most illuminating, and having looked at it briefly I think I see how it works, but can't see how I can utilise it in my situation.

              My DC's are cabinets of different shapes and sizes with different codes for each one. On each of these I place doors which are a seperate range of DC's.

              I have created various reports for quotes and cutting lists, the information for which (including colour from the 'Material' attribute) is taken from the DC.

              There are about 20 different cabinet colour options and 40 different door colours that can be used.

              If I place 20 or 30 different components in a model (made up of cabinets and doors) I would like to be able to change the colours of some (pre-selected) or all the cabinets at once, likewise the doors, and have that change updated in the DC material attribute so the correct colour is used in the reports. At present I have to do every one individually which is tedious 😒

              A plugin to do this I am sure would not be too complicated for an experienced coder (which I am not), but I could be wrong πŸ˜‰

              Pewe

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                What is the name of the DCs' material attribute ? e.g. is it "_material"
                Is it set to a material 'name' ? e.g. is it "Oak"
                How can these specific DCs be identified ? e.g. by name "*-door" or will they be in a selection ?
                Are we looking at changing the DCs Definition OR its [or some of its] Instances ?
                How do you want to run this tool ? e.g. type a command in Ruby Console, pick a Plugins menu item, click a toolbar button ???
                How do you want to set the new material ? e.g. browse a list of existing model's materials ?
                It should be relatively easy to update all of their attributes as desired...

                Can you write a short step by step description of what you want to do [missing out the 'technicalities'] so something might get tailored to suit it... e.g. You select some cabinets/doors. You click the toolbar button. It asks you to choose a new existing material off a list.... The selection is updated with the new material. [fill in the gaps πŸ˜„ ]
                πŸ€“

                TIG

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

                  Thanks Tig

                  Have sent you a PM.

                  Pewe

                  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