Attribute plugin from Smustard

Is anyone using “Attribute” from Smustard with success?

I just installed it in SU2019 to see if it works. Appears it needs some updating. The Ruby Console shows this.

<Error: #<NameError: undefined local variable or method dicts' for main:Object> C:/Users/Orbital/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/attributes.rb:80:inblock in att_apply’
C:/Users/Orbital/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/attributes.rb:79:in each' C:/Users/Orbital/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/attributes.rb:79:inatt_apply’
C:/Users/Orbital/AppData/Roaming/SketchUp/SketchUp 2019/SketchUp/Plugins/attributes.rb:99:in `block (2 levels) in <top (required)>’/>

Maybe @RickW would want to take a look at it.

More than that, it needs correcting! There appears to be a line missing in the code. The copy I just downloaded should never have worked, even in old versions of SketchUp.

Working alternatives:
Aerillus attribute Inspector
https://extensions.sketchup.com/en/content/attribute-inspector

Eneroth Attribute Editor
https://extensions.sketchup.com/en/content/eneroth-attribute-editor

SketchUp Team Attribute Helper
https://extensions.sketchup.com/en/content/attribute-helper

1 Like

@eneroth3, @MikeWayzovski I don’t know maybe I’m dense but I tried all 3 of these and I don’t see how to copy my custom attributes from one component to another. Am I missing it?

These are not automated extensions. You need to ‘inspect’ what is on one component and then create the libraries in the other.
There is one out there that does that, let me see if I can recall which one…

The reason it worked in older versions was that the code was originally full of global variables, something most of us didn’t realize were taboo back in the very beginning days of SketchUp Ruby (I wrote this in 2004).

In my haste to “update” it (by removing global variables), I ended up breaking it.

I’ve fixed it so that it functions as it originally did, but the UI needs some attention, to be sure (no guesses on when that will happen). The script allows the user to get the attributes from one object and apply them to another object.

2 Likes

Rick,

Can’t thank you enough for getting back to me on this. Sadly I’m still struggling.

If I load the extension I get the menu. I thought I could attach options or attributes to one object (component) then right click on that object and hit “get attributes” then click on the other object and “apply Attributes” and then that
second object would have the same options.

The first thing is I get a pop up asking for the “Owner” and “status” I have no idea what those are. I just put an entry in to satisfy the question. Then when I apply to the second object nothing seems to happen. I hope I’m not being to
much of a pest but this could be a game changer for me. If I have 10 different new window components that I want to have the same attributes available I don’t want to have to add them 10 times. I totally appreciate your taking the time to help me.

Thank you,

image001.jpg

Rick,

I think I might understand now. Is it that this is for copying attribute values not attribute definitions? If so my bad I’m trying to do the latter.

image001.jpg

Attributes are key/value pairs, such as “name” (the key) and “Window Unit 23” (the corresponding value). Another item may have the same key but a different value, such as “Window Unit 25”. Another key might be “manufacturer” and a corresponding value could be “Acme Window Company”.

These key/value pairs are stored in an Attribute Dictionary, which is a collection of these items, usually created by an extension for a particular purpose, but this extension will allow users to attach attributes manually, edit them, and “get” them for the purpose of applying to other elements.

I did discover that the original code was only suitable for getting and applying attributes from objects having a single Attribute Dictionary. If I get a chance, I’ll work on fixing it for multiple AD’s.