Can't Get a Custom Attribute under Object Attributes using Python

566
0
03-18-2021 01:35 AM
CL11
by
New Contributor

 

In CityEngine 2019,

I'm trying to get an Object Attribute under a Shape's Object Attribute area.  The Object Attribute is populated with custom Fields from an SHP's DBF.  For Example: The attached picture shows the custom Object Attribute, CODE.

I tried using python to access this Object Attribute, but the printed result is "None".

 

 

    object = ce.getObjectsFrom(ce.scene, ce.withName("*Shape*"))
    print(ce.getAttribute(object[0], 'CODE'))

 

 

 

How can I get access to these custom Object Attribute fields from the shape?

0 Kudos
0 Replies