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.
Maybe:
SketchUp SJ Plugins Add DC Attribute | Accessories store | sketchlocation
4 likes
Hello
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
https://sketchup.simjoubert.com/my-plugins/sj-add-dc-attribute.html
or in the Sketchucation plugin store
https://sketchucation.com/plugin/2537-sjadddcattribute
Thank you for your comments
5 likes
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 !
John
1 like
Hello! Why doesn’t it show anything? 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.
simon
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:
SimJoubert::SJ_Add_DC_Attribute::SESSION[:showputs]=true
- Select your component
- Start the plugin
- And send me the text that is displayed in the console.
`**************************************************************
***************************** CONSOLE AD DC Attribut *********
**************************************************************
SELECTION COLLECTION
collection = [#<Sketchup::ComponentInstance:0x000000013b2953d8>]
***************************** START AD DC Attribut *********
COLLECTE
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"
INITIALISTAION DE LA BOITE DE DIALOGUE
# 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"
OUVERTURE BOITE DE DIALOGUE
`
but actually the model is in CM (metric units)