Is there any API function to read advanced attributes

sketchup

#1

I am looking for some API to extract advanced attributes of component instance (check out https://help.sketchup.com/en/sketchup/classifying-objects).

However, I only spotted SUComponentInstanceCreateClassificationInfo() in component_instance.h. It is not for getting the current attributes of a component instance though. Is there anything else I can try? Thanks.


#2

As far as I remember these Price / Size etc. attributes are held in attribute dictionaries of component definition.

Try:

SUEntityGetNumAttributeDictionaries
SUEntityGetAttributeDictionaries
SUAttributeDictionaryGetName
SUAttributeDictionaryGetValue

You can also use a great SU extension “Eneroth Attribute Editor” to browse these attribute dictionaries in SU.