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 | ||
---|---|---|
function | getAttachedToolbars() | |
function | setAttachedToolbars(value) | |
A MIME (Multipurpose Internet Mail Extensions) encoded Microsoft Visio user interface (VSU) file representing custom toolbars. | ||
function | getCustomMenusFile() | |
function | setCustomMenusFile(value) | |
Contains the name of the Microsoft Visio user interface (.vsu) file that defines custom menus and accelerators for a document. | ||
function | getCustomToolbarsFile() | |
function | setCustomToolbarsFile(value) | |
Contains the name of the Microsoft Visio user interface (.vsu) file that defines custom toolbars and status bars for a document. | ||
function | getDefaultFillStyle() | |
function | 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. | ||
function | getDefaultGuideStyle() | |
function | 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. | ||
function | getDefaultLineStyle() | |
function | 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. | ||
function | getDefaultTextStyle() | |
function | 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. | ||
function | getDynamicGridEnabled() | |
function | setDynamicGridEnabled(value) | |
Specifies whether the dynamic grid feature is enabled for a document or window. The value of the property is BOOL integer constant. | ||
function | getGlueSettings() | |
function | 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. | ||
function | getProtectBkgnds() | |
function | setProtectBkgnds(value) | |
Specifies whether the user is prevented from deleting or editing background pages. The value of the property is BOOL integer constant. | ||
function | getProtectMasters() | |
function | 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. | ||
function | getProtectShapes() | |
function | 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. | ||
function | getProtectStyles() | |
function | 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. | ||
function | getSnapAngles() | |
function | setSnapAngles(value) | |
Contains a collection of SnapAngle elements. | ||
function | getSnapExtensions() | |
function | 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. | ||
function | getSnapSettings() | |
function | 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. | ||
function | getTopPage() | |
function | setTopPage(value) | |
Specifies the ID of the page that should be displayed when the document is opened by Microsoft Visio. |
Property Getters/Setters Detail |
---|
getTopPage/setTopPage : Number | |
function getTopPage() / function setTopPage(value) |
getDefaultTextStyle/setDefaultTextStyle : Number | |
function getDefaultTextStyle() / function setDefaultTextStyle(value) |
getDefaultLineStyle/setDefaultLineStyle : Number | |
function getDefaultLineStyle() / function setDefaultLineStyle(value) |
getDefaultFillStyle/setDefaultFillStyle : Number | |
function getDefaultFillStyle() / function setDefaultFillStyle(value) |
getDefaultGuideStyle/setDefaultGuideStyle : Number | |
function getDefaultGuideStyle() / function setDefaultGuideStyle(value) |
getGlueSettings/setGlueSettings : Number | |
function getGlueSettings() / function setGlueSettings(value) |
getSnapSettings/setSnapSettings : Number | |
function getSnapSettings() / function setSnapSettings(value) |
getSnapExtensions/setSnapExtensions : Number | |
function getSnapExtensions() / function setSnapExtensions(value) |
getSnapAngles/setSnapAngles : FloatPointNumCollection | |
function getSnapAngles() / function setSnapAngles(value) |
getDynamicGridEnabled/setDynamicGridEnabled : Number | |
function getDynamicGridEnabled() / function setDynamicGridEnabled(value) |
getProtectStyles/setProtectStyles : Number | |
function getProtectStyles() / function setProtectStyles(value) |
getProtectShapes/setProtectShapes : Number | |
function getProtectShapes() / function setProtectShapes(value) |
getProtectMasters/setProtectMasters : Number | |
function getProtectMasters() / function setProtectMasters(value) |
getProtectBkgnds/setProtectBkgnds : Number | |
function getProtectBkgnds() / function setProtectBkgnds(value) |
getCustomMenusFile/setCustomMenusFile : String | |
function getCustomMenusFile() / function setCustomMenusFile(value) |
getCustomToolbarsFile/setCustomToolbarsFile : String | |
function getCustomToolbarsFile() / function setCustomToolbarsFile(value) |
getAttachedToolbars/setAttachedToolbars : byte[] | |
function getAttachedToolbars() / function setAttachedToolbars(value) |