• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Plugin for DC's

Scheduled Pinned Locked Moved Plugins
7 Posts 4 Posters 1.1k Views
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 27 Jan 2010, 01:49

    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
    • C Offline
      Chris Fullmer
      last edited by 27 Jan 2010, 02:29

      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 27 Jan 2010, 10:49

        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 27 Jan 2010, 23:41

          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 28 Jan 2010, 00:17

            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
            • T Offline
              TIG Moderator
              last edited by 28 Jan 2010, 09:49

              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 28 Jan 2010, 11:06

                Thanks Tig

                Have sent you a PM.

                Pewe

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

                Advertisement