Manage Microsoft® Visio File Metadata via Python
View, add, update, remove or extract built-in and custom Visio file properties using server side Python APIs.
Java Visio API supports the management of system-defined (built-in) properties such as title, author name, document statistics etc as well as user-defined (custom) properties in the form of name-value pair. There is Diagram class to load the files, and PageCollection deals with collection of pages as well as Page class for representing single Page. Along with these classes, documentproperties, customprops makes the process simple for metadata management.
Managing Built-in Properties
For managing system-defined properties, API provides documentproperties , and programmers can easily access a built-in property and update its value.
Java Code to Manage Builtin Properties
Managing Custom Defined Properties
For managing user-defined properties, API provides customprops , and developers can easily access already added properties as well as add new properties. In order to add custom properties, Add method adds the property and returns a reference for the new property as an CustomProp object. CustomProp class is used to retrieve the name, value, and type of the document property as Name , customvalue , PropertyType enumeration values.