asposediagram.api

Contains elements that define a master for the document. A master is a shape on a stencil that you use repeatedly to create drawings. When you drag a shape from a stencil onto the drawing page, the shape becomes an instance of that master, and a local copy of the master is included in the document.

Constructor Summary
Master()
Constructor.
 
Property Getters/Setters Summary
methodgetAlignName()
method
           Specifies whether the master's text in the stencil window is aligned left, right, or center. The value of the property is AlignNameValue integer constant.
methodgetBaseID()
A GUID (globally unique identifier) that identifies the master across documents.
methodgetConnects()
Contains a Connect element for each connection between two shapes in a drawing.
methodgetHidden()
method
setHidden(value)
           Specifies whether the master is hidden in the user interface. The value of the property is BOOL integer constant.
methodgetIcon()
method
setIcon(value)
           Specifies a MIME (Multipurpose Internet Mail Extensions) encoded binary icon (in .ico format) for a Master or MasterShortcut element in a document.
methodgetIconSize()
method
           The size of the element's icon. The value of the property is IconSizeValue integer constant.
methodgetIconUpdate()
method
           Specifies whether the icon is automatically generated from the master itself. The value of the property is BOOL integer constant.
methodgetID()
method
setID(value)
           The unique ID of the element within its parent element.
methodgetMatchByName()
method
           The MatchByName attribute determines how Microsoft Visio decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file. The value of the property is BOOL integer constant.
methodgetName()
method
setName(value)
           The name of the element.
methodgetNameU()
method
setNameU(value)
           The universal name of the element.
methodgetPageSheet()
Contains elements that define the page sheet for a Page or Master element.
methodgetPatternFlags()
method
           The PatternFlags attribute determines whether a master behaves as a custom pattern.
methodgetPrompt()
method
setPrompt(value)
           The status bar and tool tip prompt for the element.
methodgetShapes()
Collection of Shape objects.
methodgetUniqueID()
A GUID that identifies the master within the document.
 
Method Summary
methoddeepClone()
Creates deep copy of this instance.
methoddispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 

    • Constructor Detail

      • Master

        Master()
        Constructor.
    • Property Getters/Setters Detail

      • getID/setID : int 

        int getID() / setID(value)
        
        The unique ID of the element within its parent element.
      • getBaseID : UUID 

        UUID getBaseID()
        
        A GUID (globally unique identifier) that identifies the master across documents.
      • getUniqueID : UUID 

        UUID getUniqueID()
        
        A GUID that identifies the master within the document.
      • getMatchByName/setMatchByName : int 

        int getMatchByName() / setMatchByName(value)
        
        The MatchByName attribute determines how Microsoft Visio decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file. The value of the property is BOOL integer constant.
      • getName/setName : String 

        String getName() / setName(value)
        
        The name of the element.
      • getNameU/setNameU : String 

        String getNameU() / setNameU(value)
        
        The universal name of the element.
      • getIconSize/setIconSize : int 

        int getIconSize() / setIconSize(value)
        
        The size of the element's icon. The value of the property is IconSizeValue integer constant.
      • getPatternFlags/setPatternFlags : int 

        int getPatternFlags() / setPatternFlags(value)
        
        The PatternFlags attribute determines whether a master behaves as a custom pattern.
      • getPrompt/setPrompt : String 

        String getPrompt() / setPrompt(value)
        
        The status bar and tool tip prompt for the element.
      • getHidden/setHidden : int 

        int getHidden() / setHidden(value)
        
        Specifies whether the master is hidden in the user interface. The value of the property is BOOL integer constant.
      • getIconUpdate/setIconUpdate : int 

        int getIconUpdate() / setIconUpdate(value)
        
        Specifies whether the icon is automatically generated from the master itself. The value of the property is BOOL integer constant.
      • getAlignName/setAlignName : int 

        int getAlignName() / setAlignName(value)
        
        Specifies whether the master's text in the stencil window is aligned left, right, or center. The value of the property is AlignNameValue integer constant.
      • getIcon/setIcon : byte[] 

        byte[] getIcon() / setIcon(value)
        
        Specifies a MIME (Multipurpose Internet Mail Extensions) encoded binary icon (in .ico format) for a Master or MasterShortcut element in a document.

        Example:

        var aspose = aspose || {};
        aspose.diagram = require("aspose.diagram");
        fs = require("fs");
        
        stencil = new aspose.diagram.Diagram("Timeline.vss");
        
        // get master
        master = stencil.getMasters().getMasterByName("Diamond milestone");
        // get byte array
        bytes = master.getIcon();
        // create an image file and write byte array to the image
        fs.writeFileSync("out-MasterIcon.png", bytes);
      • getPageSheet : PageSheet 

        PageSheet getPageSheet()
        
        Contains elements that define the page sheet for a Page or Master element.
    • Method Detail

      • dispose

         dispose()
        Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
      • deepClone

        Object deepClone()
        Creates deep copy of this instance.
        Returns: