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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Comonent Attributes Not being saved

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 309 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.
    • M Offline
      mocathe1st
      last edited by

      Hi all.

      I've just run into a bit of a problem with component attributes. What I'm trying to do is to be able to create a component, then assign some attributes to it via a simple editor I created and then save the component to a specific subfolder of the Sketchup/Components folder for use in later models.

      When I assign the attributes as follows:

      e.definition.set_attribute('dict', 'test', 'test')
      

      they are available within the component in the initial model, but when I load up the component into a new model from the component browser, the attributes are no longer available. If I save the attributes to the Sketchup.Active_Model as such:

      Sketchup.active_model.set_attribute('dict', 'test', 'test')
      

      then they are available when I load up the component from the component browser.

      I want to be able to assign attributes to specific components and then save them to the component browser, so saving to the Active_Model isn't really suitable. I might be missing something here, but I've been trying to figure this out for a while now.

      Any help would be most welcome,
      Malcolm Murray

      1 Reply Last reply Reply Quote 0
      • R Offline
        RickW
        last edited by

        After assigning the attributes to the definition, did you save out the definition (rather, an instance of it) to an external model?

        RickW
        [www.smustard.com](http://www.smustard.com)

        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