com.aspose.diagram

  • java.lang.Object
    • com.aspose.diagram.Diagram
public class Diagram 
extends java.lang.Object

Root element of Visio objects hierarchy.

Constructor Summary
Diagram(java.lang.Stringfilename)
Public class constructor, loads the diagram from the file.
Diagram(java.lang.Stringfilename, intformat)
Public class constructor, loads the diagram from the file using predefined format.
Diagram(java.lang.Stringfilename, LoadOptions options)
Public class constructor, loads the diagram from the file using predefined load file options.
 
Property Getters/Setters Summary
longgetBuildnum()
void
setBuildnum(longvalue)
           The build number of the Visio instance used to create the document.
ColorEntryCollectiongetColors()
Contains the document's color table. Each document contains a single color table, which lists the 24 standard colors that are available for application to objects such as shapes, text, and layers in the document.
DataConnectionCollectiongetDataConnections()
Contains the DataConnection elements for the document.
DataRecordSetCollectiongetDataRecordSets()
The collection of DataRecordset objects associated with a Document object.
intgetDocLangID()
void
setDocLangID(intvalue)
           The unique ID of the user-interface language the user has specified in Microsoft Office 2010 Language Preferences.
DocumentPropertiesgetDocumentProps()
Contains document property elements such as the document's title, author, and so on.
DocumentSettingsgetDocumentSettings()
Contains elements that specify document settings.
DocumentSheetgetDocumentSheet()
Specifies a document's ShapeSheet structure.
byte[]getEmailRoutingData()
void
setEmailRoutingData(byte[]value)
           Contains a MIME (Multipurpose Internet Mail Extensions) encoded MAPI e-mail routing slip for the document.
EventItemCollectiongetEventItems()
Contains an EventItem element for each event to which an object should respond.
voidsetFontDirs(java.lang.String[] value)
Indicates the Fonts folder path
FontCollectiongetFonts()
Contains a collection of Font elements
HeaderFootergetHeaderFooter()
Contains elements for a document's header and footer.
java.lang.StringgetKey()
void
setKey(java.lang.Stringvalue)
           Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
MasterCollectiongetMasters()
Collection Master objects.
intgetMetric()
void
setMetric(intvalue)
           Whether to use metric units in the drawing. Set this attribute to True (1) to use metric units; set it to False (0) to use English units. The value of the property is BOOL integer constant.
PageCollectiongetPages()
Collection Page objects.
java.lang.StringgetRibbonX()
void
setRibbonX(java.lang.Stringvalue)
           The Ribbon XML string that is passed to the document to customize the ribbon user interface.
SolutionXMLCollectiongetSolutionXMLs()
XML value.
longgetStart()
void
setStart(longvalue)
           Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
StyleSheetCollectiongetStyleSheets()
Collection StyleSheet objects.
java.lang.StringgetUserCustomUI()
void
setUserCustomUI(java.lang.Stringvalue)
           The Ribbon XML string that is passed to the document to customize the Quick Access toolbar or the ribbon.
ValidationgetValidation()
Stores information about diagram validation for the document.
Aspose.Diagram.Vba.VbaProjectgetVbaProject()
Gets the VbaProjectVbaProject.
byte[]getVbProjectData()
void
setVbProjectData(byte[]value)
           Contains the Microsoft Visual Basic for Applications project data in MIME (Multipurpose Internet Mail Extensions) encoded format.
java.lang.StringgetVersion()
void
setVersion(java.lang.Stringvalue)
           The version number of the Visio instance. Microsoft Visio 2010 = 14.
WindowCollectiongetWindows()
Contains the Window elements for a document.
 
Method Summary
intaddMaster(Diagram srcDiagram, java.lang.String masterName)
Adds master to diagram from source diagram by master's Name or NameU.
intaddMaster(java.lang.String templateFilePath, int masterID)
Adds master to diagram from template file by master's ID.
intaddMaster(java.lang.String templateFilePath, java.lang.String masterName)
Adds master to diagram from template file by master's Name or NameU.
longaddShape(Shape newShape, java.lang.String masterName, int pageNumber)
Adds shape created by master to specific page.
longaddShape(double pinX, double pinY, double width, double height, java.lang.String masterName, int pageNumber)
Adds shape created by master on page with defined PinX,PinY,Width and Height.
longaddShape(double pinX, double pinY, java.lang.String masterName, int pageNumber)
Adds shape created by master on page with defined PinX and PinY.
voidcombine(Diagram secondDiagram)
Combines another Diagram object.
voidcopyTheme(Diagram source)
Copies Theme from a source Diagram.
static voidexport(java.lang.String inputVsd, java.lang.String outputVdw)
Exports the diagram from vsd to vdw format. Not implemented yet.
voidprint(java.lang.String printerName)
Print the whole document to the specified printer,using the standard (no User Interface) print controller.
voidprint(java.lang.String printerName, java.lang.String documentName)
Prints the document,using the standard (no User Interface) print controller and a document name.
voidremoveMacro()
Removes VBA/macro from this diagram.
voidsave(java.lang.String filename, int format)
Saves the diagram data to the file.
 

    • Constructor Detail

      • Diagram

        public Diagram()
      • Diagram

        public Diagram(java.lang.String filename)
                throws java.lang.Exception
        Public class constructor, loads the diagram from the file.
        Parameters:
        filename - The file name.
      • Diagram

        public Diagram(java.lang.String filename, int format)
                throws java.lang.Exception
        Public class constructor, loads the diagram from the file using predefined format.
        Parameters:
        filename - The file name.
        format - A LoadFileFormat value. The file format.
      • Diagram

        public Diagram(java.lang.String filename, LoadOptions options)
                throws java.lang.Exception
        Public class constructor, loads the diagram from the file using predefined load file options.
        Parameters:
        filename - The file name.
        options - The data LoadOptions.
    • Property Getters/Setters Detail

      • getStart/setStart

        public long getStart() / public void setStart(long value)
        
        Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
      • setFontDirs

        public void setFontDirs(java.lang.String[] value)
        
        Indicates the Fonts folder path
      • getKey/setKey

        public java.lang.String getKey() / public void setKey(java.lang.String value)
        
        Indicates whether the document has been modified outside of Visio. If present, Visio will fully test the contents of the file. Omit for files you create outside of Visio.
      • getMetric/setMetric

        public int getMetric() / public void setMetric(int value)
        
        Whether to use metric units in the drawing. Set this attribute to True (1) to use metric units; set it to False (0) to use English units. The value of the property is BOOL integer constant.
      • getBuildnum/setBuildnum

        public long getBuildnum() / public void setBuildnum(long value)
        
        The build number of the Visio instance used to create the document.
      • getVersion/setVersion

        public java.lang.String getVersion() / public void setVersion(java.lang.String value)
        
        The version number of the Visio instance. Microsoft Visio 2010 = 14.
      • getDocLangID/setDocLangID

        public int getDocLangID() / public void setDocLangID(int value)
        
        The unique ID of the user-interface language the user has specified in Microsoft Office 2010 Language Preferences.
      • getDocumentProps

        public DocumentProperties getDocumentProps()
        
        Contains document property elements such as the document's title, author, and so on.
      • getDocumentSettings

        public DocumentSettings getDocumentSettings()
        
        Contains elements that specify document settings.
      • getColors

        public ColorEntryCollection getColors()
        
        Contains the document's color table. Each document contains a single color table, which lists the 24 standard colors that are available for application to objects such as shapes, text, and layers in the document.
      • getFonts

        public FontCollection getFonts()
        
        Contains a collection of Font elements
      • getDocumentSheet

        public DocumentSheet getDocumentSheet()
        
        Specifies a document's ShapeSheet structure.
      • getWindows

        public WindowCollection getWindows()
        
        Contains the Window elements for a document.
      • getEventItems

        public EventItemCollection getEventItems()
        
        Contains an EventItem element for each event to which an object should respond.
      • getHeaderFooter

        public HeaderFooter getHeaderFooter()
        
        Contains elements for a document's header and footer.
      • getVbProjectData/setVbProjectData

        public byte[] getVbProjectData() / public void setVbProjectData(byte[] value)
        
        Contains the Microsoft Visual Basic for Applications project data in MIME (Multipurpose Internet Mail Extensions) encoded format.
      • getEmailRoutingData/setEmailRoutingData

        public byte[] getEmailRoutingData() / public void setEmailRoutingData(byte[] value)
        
        Contains a MIME (Multipurpose Internet Mail Extensions) encoded MAPI e-mail routing slip for the document.
      • getDataConnections

        public DataConnectionCollection getDataConnections()
        
        Contains the DataConnection elements for the document.
      • getDataRecordSets

        public DataRecordSetCollection getDataRecordSets()
        
        The collection of DataRecordset objects associated with a Document object.
      • getRibbonX/setRibbonX

        public java.lang.String getRibbonX() / public void setRibbonX(java.lang.String value)
        
        The Ribbon XML string that is passed to the document to customize the ribbon user interface.
      • getUserCustomUI/setUserCustomUI

        public java.lang.String getUserCustomUI() / public void setUserCustomUI(java.lang.String value)
        
        The Ribbon XML string that is passed to the document to customize the Quick Access toolbar or the ribbon.
      • getValidation

        public Validation getValidation()
        
        Stores information about diagram validation for the document.
      • getVbaProject

        public Aspose.Diagram.Vba.VbaProject getVbaProject()
        
        Gets the VbaProjectVbaProject.
    • Method Detail

      • save

        public void save(java.lang.String filename, int format)
                 throws java.lang.Exception
        Saves the diagram data to the file.
        Parameters:
        filename - The file name.
        format - A SaveFileFormat value. SaveFileFormat save file format.
      • export

        public static void export(java.lang.String inputVsd, java.lang.String outputVdw)
                               throws java.lang.Exception
        Exports the diagram from vsd to vdw format. Not implemented yet.
        Parameters:
        inputVsd - *.vsd file name.
        outputVdw - *.vdw file name.
      • copyTheme

        public void copyTheme(Diagram source)
        Copies Theme from a source Diagram.
        Parameters:
        source - source diagram.
      • combine

        public void combine(Diagram secondDiagram)
                    throws java.lang.Exception
        Combines another Diagram object.
        Parameters:
        secondDiagram - Another Diagram object.
      • addMaster

        public int addMaster(Diagram srcDiagram, java.lang.String masterName)
                     throws java.lang.Exception
        Adds master to diagram from source diagram by master's Name or NameU.
        Parameters:
        srcDiagram - source diagram.
        masterName - Master's Name or NameU.
        Returns:
        The unique ID of the master within masters collection in this diagram.
      • addMaster

        public int addMaster(java.lang.String templateFilePath, java.lang.String masterName)
                     throws java.lang.Exception
        Adds master to diagram from template file by master's Name or NameU.
        Parameters:
        templateFilePath - Path to template file(can be vdx, vst or vsd format).
        masterName - Master's Name or NameU.
        Returns:
        The unique ID of the master within masters collection in this diagram.
      • addMaster

        public int addMaster(java.lang.String templateFilePath, int masterID)
                     throws java.lang.Exception
        Adds master to diagram from template file by master's ID.
        Parameters:
        templateFilePath - Path to template file(can be vdx, vst or vsd format).
        masterID - The unique ID of the master within masters collection in template.
        Returns:
        The unique ID of the master within masters collection in this diagram.
      • addShape

        public long addShape(Shape newShape, java.lang.String masterName, int pageNumber)
                     throws java.lang.Exception
        Adds shape created by master to specific page.
        Parameters:
        newShape - New shape objectShape.
        masterName - Master's name.
        pageNumber - Index of page.
        Returns:
        The unique ID of the shape within shapes collection on the specified page.
      • addShape

        public long addShape(double pinX, double pinY, java.lang.String masterName, int pageNumber)
                     throws java.lang.Exception
        Adds shape created by master on page with defined PinX and PinY.
        Parameters:
        pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
        pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
        masterName - Master's name.
        pageNumber - Index of page.
        Returns:
        The unique ID of the shape within shapes collection on the specified page.
      • addShape

        public long addShape(double pinX, double pinY, double width, double height, java.lang.String masterName, int pageNumber)
                     throws java.lang.Exception
        Adds shape created by master on page with defined PinX,PinY,Width and Height.
        Parameters:
        pinX - Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.
        pinY - Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.
        width - Specifies the width of the shape in inches.
        height - Specifies the height of the shape in inches.
        masterName - Master's name.
        pageNumber - Index of page.
        Returns:
        The unique ID of the shape within shapes collection on the specified page.
      • print

        public void print(java.lang.String printerName)
                  throws java.lang.Exception
        Print the whole document to the specified printer,using the standard (no User Interface) print controller. If printerName is Null or empty will be used default printer.
        Parameters:
        printerName - The name of the printer.Can be Null
      • print

        public void print(java.lang.String printerName, java.lang.String documentName)
                  throws java.lang.Exception
        Prints the document,using the standard (no User Interface) print controller and a document name.
        Parameters:
        printerName - The name of the printer.Can be Null
        documentName - The document name to display (for example, in a print status dialog box or printer queue) while printing the document.
      • removeMacro

        public void removeMacro()
        Removes VBA/macro from this diagram.