sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Component attributes update problem

    Scheduled Pinned Locked Moved Plugins
    6 Posts 2 Posters 724 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.
    • JujuSKPJ Offline
      JujuSKP Extension Creator
      last edited by

      Hello,

      I try to find a solution to automatically update all the attributes ( like name, summary, itemcode … ) for the same duplicate component.

      An exemple to be clear,
      I draw a « pencil » and create a component.
      on the attributes I write « pencil » for component attribute « name » and « blue » on « summary »
      I duplicate this component 10 times.
      After, I select one and I change « summary » writing « black » instead of « blue » because I decide to change the pencil color.
      If I select an other component, the « summary » case still show « blue » instead of « black » …
      I try to save my good component ( the « black » one ) and I reload it … my attributes are not changing …

      I made a lot of research on the net and test some plugins … but impossible to find a solution …
      I hope I am enough clear ( i’m french 😄 )

      Thank you for your help

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        @unknownuser said:

        Hello,

        I try to find a solution to automatically update all the attributes ( like name, summary, itemcode … ) for the same duplicate component.

        An exemple to be clear,
        I draw a « pencil » and create a component.
        on the attributes I write « pencil » for component attribute « name » and « blue » on « summary »
        I duplicate this component 10 times.
        After, I select one and I change « summary » writing « black » instead of « blue » because I decide to change the pencil color.
        If I select an other component, the « summary » case still show « blue » instead of « black » …
        I try to save my good component ( the « black » one ) and I reload it … my attributes are not changing …

        I made a lot of research on the net and test some plugins … but impossible to find a solution …
        I hope I am enough clear ( i’m french 😄 )

        Thank you for your help

        You need to associate the attribute dictionary with the components definition not the instance.

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • JujuSKPJ Offline
          JujuSKP Extension Creator
          last edited by

          Hi,
          sorry I am not understanding how to associate the attribute with the component definition not the instance, can you explain please
          thanks

          1 Reply Last reply Reply Quote 0
          • JujuSKPJ Offline
            JujuSKP Extension Creator
            last edited by

            is there a function I can use to always refer attributes to definitions of the component and not individual instance ?

            1 Reply Last reply Reply Quote 0
            • sdmitchS Offline
              sdmitch
              last edited by

              @unknownuser said:

              Hi,
              sorry I am not understanding how to associate the attribute with the component definition not the instance, can you explain please
              thanks

              If ci = a component instance then ci.definition would refer to the component definition of that instance.

              So ci.definition.set_attribute("Dictionary","Key","Value") would be needed to create the attribute and ci.definition.get_attribute("Dictionary","Key") would retrieve it.

              Nothing is worthless, it can always be used as a bad example.

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • JujuSKPJ Offline
                JujuSKP Extension Creator
                last edited by

                Thanks for your reply.
                I finally use classification ( an ifc one ) for components and put all my parameters on it ( ref, name, details ... ). That allow me to avoid the "instance" use and exploit my component definition on layout drawings notes ( on that case it is for electrical draw with a lot of repeated references/details ).

                regards

                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