Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("AddingNewShape.vsdx"); // get page by name page = diagram.getPages().getPage("Page-3"); for (it = page.getShapes().iterator(); it.hasNext();) { shape = it.next(); if (shape.getName() == "Process1") { for (prop_it = shape.getProps().iterator(); prop_it.hasNext();) { prop = prop_it.next(); console.log(prop.getLabel().getValue() + ": " + prop.getValue().getVal()); } break; } }
Property Getters/Setters Summary | ||
---|---|---|
method | getCount() | |
Gets the number of elements actually contained in the collection.
|
||
method | get(index) | |
Gets the element at the specified index.
|
Method Summary | ||
---|---|---|
method | add(item) | |
Add the shape in the collection.
|
||
method | clear() | |
Removes all elements from collection.
|
||
method | getShape(name) | |
Gets the element at the specified name.
|
||
method | getShape(ID) | |
Gets the element at the specified ID.
|
||
method | getShapeIncludingChild(id) | |
Gets the element including it's child shape at the specified id.
|
||
method | getShapeIncludingChild(name) | |
Gets the element including it's child shape at the specified name.
|
||
method | group(groupItems) | |
Group the shapes.
|
||
method | isExist(index) | |
Is exist item in the collection.
|
||
method | iterator() | |
Supports a simple iteration over a nongeneric collection.
|
||
method | remove(item) | |
Remove the shape from the collection.
|
||
method | removeDependsOn(item) | |
Remove the shapes including DEPENDSON shapes from the collection.
|
||
method | unGroup(groupShape) | |
UnGroup the shape.
|
int getCount()
int add(item)
item: Shape
- remove(item)
item: Shape
- ShaperemoveDependsOn(item)
item: Shape
- ShapeunGroup(groupShape)
groupShape: Shape
- the group shape.Shape group(groupItems)
groupItems: Shape[]
- the group items.Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); var java = require("java"); diagram = new aspose.diagram.Diagram("GroupShapes.vsdx"); // get page by name page = diagram.getPages().getPage("Page-3"); ss = new Array(3); // extract and assign shapes to the array ss[0] = page.getShapes().getShape(15); ss[1] = page.getShapes().getShape(16); ss[2] = page.getShapes().getShape(17); // Initialize an array of shapes jss = java.newArray('com.aspose.diagram.Shape', ss); // mark array shapes as group page.getShapes().group(jss); diagram.save("out-GroupShapes.vsdx", aspose.diagram.SaveFileFormat.VSDX);
Shape getShape(name)
name: String
- Shape getShapeIncludingChild(name)
name: String
- Shape getShapeIncludingChild(id)
name
- Shape getShape(ID)
ID: long
- Iterator iterator()
boolean isExist(index)
index: int
- index of element.clear()