Plugin to add dynamic component attributes automatically

Hi, first time writing on the forums. I hope someone has a solution to this problem.

For my work, we use many standard components that have dynamic component attributes so you can select the required fixings. For example, on a certain mount we use a dropdown list to select ‘M12 x50mm Bolt’. We then use the ‘generate report’ function to collate the total number of bolts etc. necessary for the project.

The problem occurs when we design custom supports in Solidworks and import them as STL. It takes too long to manually add dynamic component attributes to each one.

Is there a plugin or ruby ​​script to easily add a group of attributes to a component? It would be the same attributes every time.

It would be great to know if anyone has a solution for this!

Thank you.


SketchUp SJ Plugins Add DC Attribute | Accessories store | sketchlocation


I have developed and shared a plugin called SJ Add DC attribute.
Allows you to create, copy dynamic component attributes from a favorites list or from a source component.
You can consult the documentation and download it on my website

or in the Sketchucation plugin store

Thank you for your comments


Thanks for your answer Simon. Your plugin is exactly what I was looking for! Thank you very much for developing that.

Just a couple of suggestions/questions:

  • Would it be possible to select all ‘favorite’ attributes so I can add them in one go, instead of clicking add individually? (I have more than 10 attributes to add)

  • Is it possible to save favorite attributes so they transfer between skp models?

Thanks again !


1 like

Hello! Why doesn’t it show anything? :grimacing: sketch up 2022

Hello Ivaaannnnn

You have to tell me a little more so I can help you.

To work, the plugin needs components to be selected before starting the plugin.
Has the plugin ever worked in your installation or is it only bugging for this session? This model ? this component?

Version 3.2 does not support installing into a folder other than the standard SketchUp Plugins folder. The next version will fix this.


I’m sorry,

this is the first execution of your extension. I just installed it using Extension Manager.
Yes, I first select a component and then press the component button.

For me it doesn’t work with any of the components.

I see you are on MAC.
I was not able to test the plugin on this platform due to lack of hardware, but you are the first to report such a bug.

You can do the following procedure:

  • Close plugin window
  • Open the Ruby console
  • Pass the following code:
  • Select your component
  • Start the plugin
  • And send me the text that is displayed in the console.

***************************** CONSOLE AD DC Attribut *********

 collection = [#<Sketchup::ComponentInstance:0x000000013b2953d8>]

***************************** START AD DC Attribut *********

L'unité du modèle length_units = "INCHES"

 Collecte des définitions dans la sélection => listeAttributsDefinitions = "[{\"name\":\"СБ:Стойка угловая\",\"attributs\":[{\"label\":\"onClick\",\"state1\":3,\"name\":\"onclick\",\"formulaunits\":\"STRING\",\"value\":\"ANIMATE(\\\"RotZ\\\",0,90,180,270)\"}]}]"

 Collecte des favoris => listeAttributsFavoris = []

 Collecte des préférences d'affichages des infobulles => preferenceInfobulle = true

 Initialisation de la liste des attributs => listeAttributs = []
On récupère la langue de Sketchup => langue = "ru"
# L'unité du modèle => length_units = "INCHES"


# Javascript à exécuter une fois la boîte de dialogue affichée => 
 js = "Simjoubert.listeAttributsDefinitions = [{\"name\":\"СБ:Стойка угловая\",\"attributs\":[{\"label\":\"onClick\",\"state1\":3,\"name\":\"onclick\",\"formulaunits\":\"STRING\",\"value\":\"ANIMATE(\\\"RotZ\\\",0,90,180,270)\"}]}];\n      Simjoubert.listeAttributsFavoris = [];\n      Simjoubert.listeAttributs = [] ;\n      Simjoubert.version = '0.3.3';\n      Simjoubert.showtooltips = true;\n      Simjoubert.lenght_units="";\n      Simjoubert.traduction('ru');"

# URL du fichier HTML => url = "/Users/ivan/Library/Application Support/SketchUp 2022/SketchUp/Plugins/sj_Add_DC_Attribute/html/DialogueAddDCAttribut.html"


but actually the model is in CM (metric units)

Hello Ivan
Have you tried on a pick with another component, another component on another model?
Do you have several models open?
The report seems correct!
Can you verify if the HTML file whose URL appears in the report exists on your machine?

Yes, I tried other components on different models. – the same.
I tried a single new and simple model.
Yes, you have an HTML file in those folders.

Hello Ivan
Can you right click on the blank dialog that appears and click on the developer tools option to see if there are any javascript errors?

How to get this “optional development tool”? :person_shrugging:

Source link

James D. Brown
James D. Brown
Articles: 8408