Free Support Forum - aspose.com

How to configure Shape properties with Aspose.Diagram?


#1

Hi:

I tried the following code to configure the shape properties (the ones visible in the SHAPE DATA window in Visio), but it is not working - the properties are not being set:

for (shapeProperty in shapeProperties.properties) {
val prop = Prop()
prop.name = shapeProperty.name
prop.nameU = shapeProperty.name
prop.value.val = shapeProperty.value ?: “”
shape.props.add(prop)
}

I am not sure about what is wrong about it - there are no examples on how to add properties in the example, and I cannot figure out how to do it.

Can you help me with a working example of how to add the properties?


#2

@raviaw

Thanks for contacting support.

Would you please share your sample Diagram file with us along with sample values you want to set for Shape Data. We will test the scenario in our environment and address it accordingly.