How can I add/save custom attribute of shapes?

I would like to create some custom fields for a shape and save it in vsdx
image.png (3.4 KB)
Please guide me how to convert and retrieve this value with Aspose.Diagram.Shape



Could you please share a sample VSDX that has these properties set and please also share how it can be observed in MS Visio. We will test the scenario in our environment and address it accordingly.

I don’t have visio file, I’m using your demo source code and try to create a visio file which could add a custom property to a shape and retrieve its value by Aspose Diagram API


Please try using the below code snippet to add properties to the Shapes and let us know if it does not fulfil your requirements:

Aspose.Diagram.Prop prop6 = new Aspose.Diagram.Prop();
prop6.Name = "Priority";
prop6.Label.Value = "Priority";
prop6.Value.Val = "6";


Thanks for your support Asad. I would love to add properties to shapes on UI via MxGraph as well. It will be great if you could give me a code snippet for it. Thanks in advance :slight_smile:


The forum is dedicated only for queries related to Aspose.Diagram. In case you need further assistance, please feel free to let us know.