• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Component attributes update problem

Scheduled Pinned Locked Moved Plugins
6 Posts 2 Posters 691 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.
  • J Offline
    JujuSKP Extension Creator
    last edited by 15 Apr 2016, 19:47

    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
    • S Offline
      sdmitch
      last edited by 16 Apr 2016, 01:10

      @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
      • J Offline
        JujuSKP Extension Creator
        last edited by 16 Apr 2016, 07:37

        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
        • J Offline
          JujuSKP Extension Creator
          last edited by 16 Apr 2016, 09:33

          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
          • S Offline
            sdmitch
            last edited by 16 Apr 2016, 14:00

            @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
            • J Offline
              JujuSKP Extension Creator
              last edited by 16 Apr 2016, 17:52

              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
              1 / 1
              • First post
                1/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement