Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); srcVisio = new aspose.diagram.Diagram("AddingNewShape.vsdx"); // initialize a new Visio newDiagram = new aspose.diagram.Diagram(); // add all masters from the source Visio diagram originalMasters = srcVisio.getMasters(); for (it = originalMasters.iterator(); it.hasNext();) { master = it.next(); newDiagram.addMaster(srcVisio, master.getName()); } // get the page object from the original diagram SrcPage = srcVisio.getPages().getPage("Page-1"); // copy themes from the source diagram newDiagram.copyTheme(srcVisio); // copy pagesheet of the source Visio page newDiagram.getPages().get(0).getPageSheet().copy(SrcPage.getPageSheet()); // copy shapes from the source Visio page for (it = SrcPage.getShapes().iterator(); it.hasNext();) { shape = it.next(); newDiagram.getPages().get(0).getShapes().add(shape); } newDiagram.save("out-CopyShapes.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Property Getters/Setters Summary | ||
---|---|---|
method | getActs() | |
Contains a collection of Act elements.
|
||
method | getAnnotations() | |
Contains elements that contain information about comments inserted into a document page.
|
||
method | getConnectionABCDs() | |
Contains a collection of ConnectionABCD elements.
|
||
method | getConnections() | |
Contains a collection of Connection elements.
|
||
method | getFillStyle() | |
method | setFillStyle(value) | |
StyleSheet element from which the PageSheet inherits fill formatting. | ||
method | getForeign() | |
Contains elements specifying the width and height of an object from another program used in a Microsoft Visio document. Also includes elements specifying the distance the object's image is offset within its borders.
|
||
method | getForeignData() | |
Contains a MIME (Multipurpose Internet Mail Extensions) encoded BLOB of picture data, such as Windows metafile, bitmap, or OLE data.
|
||
method | getHyperlinks() | |
Contains a collection of Hyperlink elements.
|
||
method | getLayers() | |
Contains a collection of Layer elements.
|
||
method | getLineStyle() | |
method | setLineStyle(value) | |
StyleSheet element from which the PageSheet inherits line formatting. | ||
method | getPageLayout() | |
Contains Diagram that control the page layout settings for shapes and connectors, such as spacing between all shapes on the page, spacing between all connectors on the page, and routing style for all connectors on the page.
|
||
method | getPageProps() | |
Contains Diagram that control page attributes, such as the page width, height, and scale.
|
||
method | getPrintProps() | |
Contains elements that control how the drawing page is formatted (appears) on the printer page.
|
||
method | getProps() | |
Contains a collection of Prop elements.
|
||
method | getRulerGrid() | |
Contains elements that specify the settings of the page's rulers and grid.
|
||
method | getScratchs() | |
Contains a collection of Scratch elements.
|
||
method | getSmartTagDefs() | |
Contains a collection of SmartTagDef elements.
|
||
method | getTextStyle() | |
method | setTextStyle(value) | |
StyleSheet element from which the PageSheet inherits text formatting. | ||
method | getUniqueID() | |
A GUID (globally unique identifier) for the element.
|
||
method | getUsers() | |
Contains a collection of User elements.
|
||
method | getXForm() | |
Contains elements specifying general positioning information about a shape.
|
Method Summary | ||
---|---|---|
method | copy(source) | |
Copies pagesheet from a source object.
|
StyleSheet getLineStyle() / setLineStyle(value)
StyleSheet getFillStyle() / setFillStyle(value)
StyleSheet getTextStyle() / setTextStyle(value)
UUID getUniqueID()
XForm getXForm()
PageProps getPageProps()
RulerGrid getRulerGrid()
PageLayout getPageLayout()
PrintProps getPrintProps()
ScratchCollection getScratchs()
ConnectionCollection getConnections()
ConnectionABCDCollection getConnectionABCDs()
ActCollection getActs()
LayerCollection getLayers()
Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("Layers.vsdx"); // get Visio page page = diagram.getPages().getPage("Page-1"); layers = page.getPageSheet().getLayers(); // iterate through the layers for (var it = layers.iterator(); it.hasNext();) { layer = it.next(); console.log("Name: " + layer.getName().getValue()); console.log("Visibility: " + layer.getVisible().getValue()); console.log("Status: " + layer.getStatus().getValue()); }
UserCollection getUsers()
PropCollection getProps()
HyperlinkCollection getHyperlinks()
SmartTagDefCollection getSmartTagDefs()
AnnotationCollection getAnnotations()
Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); var diagram = new aspose.diagram.Diagram("Drawing1.vsdx"); // get collection of the annotations annotations = diagram.getPages().getPage("Page-1").getPageSheet().getAnnotations(); for (var it = annotations.iterator(); it.hasNext();) { annotation = it.next(); var comment = annotation.getComment().getValue(); comment += "Updation mark"; annotation.getComment().setValue(comment); } diagram.save("out-EditPageLevelCommentInVisio.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Foreign getForeign()
ForeignData getForeignData()