Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("ProtectAndUnprotect.vsd"); diagram.getDocumentSettings().setProtectBkgnds(aspose.diagram.BOOL.TRUE); diagram.getDocumentSettings().setProtectMasters(aspose.diagram.BOOL.TRUE); diagram.getDocumentSettings().setProtectShapes(aspose.diagram.BOOL.TRUE); diagram.getDocumentSettings().setProtectStyles(aspose.diagram.BOOL.TRUE); diagram.save("out-VisioDiagramProtection.vdx", aspose.diagram.SaveFileFormat.VDX);
Property Getters/Setters Summary | ||
---|---|---|
method | getAttachedToolbars() | |
method | setAttachedToolbars(value) | |
A MIME (Multipurpose Internet Mail Extensions) encoded Microsoft Visio user interface (VSU) file representing custom toolbars. | ||
method | getCustomMenusFile() | |
method | setCustomMenusFile(value) | |
Contains the name of the Microsoft Visio user interface (.vsu) file that defines custom menus and accelerators for a document. | ||
method | getCustomToolbarsFile() | |
method | setCustomToolbarsFile(value) | |
Contains the name of the Microsoft Visio user interface (.vsu) file that defines custom toolbars and status bars for a document. | ||
method | getDefaultFillStyle() | |
method | setDefaultFillStyle(value) | |
Specifies the ID of a StyleSheet element. The next time the user creates a shape using a drawing tool, the shape inherits its fill style from the specified StyleSheet element. | ||
method | getDefaultGuideStyle() | |
method | setDefaultGuideStyle(value) | |
Specifies the ID of a StyleSheet element. The next time the user creates a guide, the guide inherits its guide style from the specified StyleSheet element. | ||
method | getDefaultLineStyle() | |
method | setDefaultLineStyle(value) | |
Specifies the ID of a StyleSheet element. The next time the user creates a shape using a drawing tool, the shape inherits its line style from the specified StyleSheet element. | ||
method | getDefaultTextStyle() | |
method | setDefaultTextStyle(value) | |
Specifies the ID of a StyleSheet element. The next time the user creates a shape using a drawing tool, the shape inherits its text style from the specified StyleSheet element. | ||
method | getDynamicGridEnabled() | |
method | setDynamicGridEnabled(value) | |
Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant. | ||
method | getGlueSettings() | |
method | setGlueSettings(value) | |
Specifies the objects that shapes glue to when glue is enabled in the document. The value of the property is GlueSettings integer constant. | ||
method | getProtectBkgnds() | |
method | setProtectBkgnds(value) | |
Specifies whether the user is prevented from deleting or editing background pages. The value of the property is BOOL integer constant. | ||
method | getProtectMasters() | |
method | setProtectMasters(value) | |
Specifies whether the user is prevented from creating, editing, or deleting masters. Regardless of this setting, the user can still create instances of masters. The value of the property is BOOL integer constant. | ||
method | getProtectShapes() | |
method | setProtectShapes(value) | |
Specifies whether the user is prevented from selecting shapes that have their LockSelect element set to 1. The value of the property is BOOL integer constant. | ||
method | getProtectStyles() | |
method | setProtectStyles(value) | |
Specifies whether the user is prevented from creating or editing styles. However, regardless of this setting, the user can still apply styles. The value of the property is BOOL integer constant. | ||
method | getSnapAngles() | |
method | setSnapAngles(value) | |
Contains a collection of SnapAngle elements. | ||
method | getSnapExtensions() | |
method | setSnapExtensions(value) | |
Specifies whether a specific snap extension setting is enabled or disabled for the active window. The value of the property is SnapExtensions integer constant. | ||
method | getSnapSettings() | |
method | setSnapSettings(value) | |
Specifies the objects that shapes snap to when snap is active in the window. The value of the property is SnapSettings integer constant. | ||
method | getTopPage() | |
method | setTopPage(value) | |
Specifies the ID of the page that should be displayed when the document is opened by Microsoft Visio. |
int getTopPage() / setTopPage(value)
int getDefaultTextStyle() / setDefaultTextStyle(value)
int getDefaultLineStyle() / setDefaultLineStyle(value)
int getDefaultFillStyle() / setDefaultFillStyle(value)
int getDefaultGuideStyle() / setDefaultGuideStyle(value)
int getGlueSettings() / setGlueSettings(value)
int getSnapSettings() / setSnapSettings(value)
int getSnapExtensions() / setSnapExtensions(value)
FloatPointNumCollection getSnapAngles() / setSnapAngles(value)
int getDynamicGridEnabled() / setDynamicGridEnabled(value)
int getProtectStyles() / setProtectStyles(value)
int getProtectShapes() / setProtectShapes(value)
int getProtectMasters() / setProtectMasters(value)
int getProtectBkgnds() / setProtectBkgnds(value)
String getCustomMenusFile() / setCustomMenusFile(value)
String getCustomToolbarsFile() / setCustomToolbarsFile(value)
byte[] getAttachedToolbars() / setAttachedToolbars(value)