Is there any way to view an component attribute dictionary entry inside the component options

I have created an attribute dictionary according Building Smart rules with:

instance = Sketchup.active_model.selection[0]

instance.definition.add_classification("IFC 2x3", "IfcWall")
path = ["IFC 2x3", "IfcWall", "ObjectType", "IfcLabel"]
success = instance.definition.set_classification_value(path, "RafaWall")

status = instance.set_attribute "PsetWallCommon", "Reference", "Wall001"

When I open Component Options I can’t find that entry visible. Nevertheless when I import an IFC file thre are lots of dictionary entries visible.
Is there any way to make a pair of key & value visible?
Thanks in advance and sorry by my poor English…

It needs to be applied to the definition of the selected object, not the instance, so the object needs to be a component in the first place

my instance is a component. Do you mean that I should do like this?

status = instance.definition.set_attribute "PsetWallCommon", "Reference", "Wall001"

The only dictionaries that are displayed in the component options dialog are the classifications and the Dynamic components ones, eg. AppliedSchemaTypes and dynamic_attributes.
You need to create a classification yourself in order to have it displayed in that Panel.

Example of .skc file (rename to .skc):
NAHB Cost codes.ZIP (5,4 KB)

https://help.sketchup.com/en/sketchup/classifying-objects

2 Likes

Thanks a lot!

If you cannot see where an attribute went, you can browse all attributes of the selected entities with Attribute Inspector or verify that the attributes are on the definition and not the instance.

3 Likes

Thanks! I downloaded and it is very useful. My target is to achive a better IFC export with more attributes than the default ones.

Check this extension, as well:

1 Like