Genereted dynamic attributes not appearing in report

Hi, I have been developing in the last few weeks a script to create assets and automatically fill in the dynamic attributes.

These functions have worked correctly, however when
I insert these generated assets into a project and generate the report, these filled attributes do not appear in the report, but all the others manually filled appear. Has anyone experienced the same and found a solution?

Silly question, did you add them to the list of attributes included in the report?

We cannot guess. Show us a snippet of how you are setting one of your attributes.

they don’t even show up in the attribute list.

Example: in this project i can see the attribute in dynamic attributes, but i can’t see it in report list


Here, i put it inside a function, but ‘component’ is the componentDefinition and id_prod is a value returned by an endpoint.

component.set_attribute('dynamic_attributes', 'iditem', id_prod)
  component.set_attribute('dynamic_attributes', '_iditem_formulaunits',
  component.set_attribute('dynamic_attributes', '_iditem_units', 'STRING')
  component.set_attribute('dynamic_attributes', '_iditem_access', 'TEXTBOX')

Did you redraw the DC’s instances afterward ?

Also, both the definition and it’s instances have "dynamic_attributes" dictionaries.
When the instances have attribute values that differ from the default, the values are stored in the instance’s dynamic dictionary.

1 Like

Yes, I redraw them.

Even in the saved file it appears in the report, but when I import the file inside another the attribute disappears from the report but stays in that dynamic attribute tab.

I ran with the component and with the instance, but even so the problem persists.

this might help

Well, past a few months the error came back, i’ve tried these two suggestions but neither worked. i’d just workarounded these last months, but now i can’t anymore. Let me explain what’s happening now.

I’ve created a script to open a list of component in an irrelevant sketchup file then set up some dynamic attributes, like iditem, description, etc… then saved them in a proper file

But when i import these component assets inside a project i can see the dynamic attributes in component attributes tab, but looking inside component option got the followed error:


Tried use the plugin created by Eneroth “Attribute Editor” but the dynamic ones only shows the attributes “_has_movetool_behaviors” and “_hasbehaviors”, like showed below.

I thought this is why i can’t see them in report!

Have you considered to export your SketchUp model to Trimble Connect? You can generate a report in CSV format and you can find more parameters than in the SketchUp report.

Those are a few of Flextools Windows…

I thought about it, but I need it to be done with ruby and sketchup only, so i think that wont work :frowning:

As I said above …

This means that when the instance does not have values that differ from the definition’s default values, then the instance’s dictionary will not have these DC attributes. So in this case, the value must be taken from the component definition’s dynamic dictionary.

I would suggest using Aerilius’ Attribute Inspector extension. You can choose to look at the selected instance’s definition’s dictionaries using this inspector.