class
MasterCollection
Source: aspose.
Master collection.
Methods
add(master) → Number
Add the Master object in the collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
master |
|
- Returns
-
Number
clear()
Removes all elements from collection.
get(index) → Master
Gets the element at the specified index.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
index |
Number |
|
- Returns
getCount()
Gets the number of elements actually contained in the collection.
getMaster(ID) → Master
Gets the element at the specified ID.
Example
var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("RetrieveMasterInfo.vdx");
// Get master object by id
master = diagram.getMasters().getMaster(2);
console.log("Master ID : " + master.getID());
console.log("Master Name : " + master.getName());
console.log("Master Name : " + master.getUniqueID());
Parameter
Name | Type | Optional | Description |
---|---|---|---|
ID |
Number |
|
- Returns
getMasterByName(name) → Master
Get master by name.
Example
var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("BasicShapes.vss");
// Get master object by name
master = diagram.getMasters().getMasterByName("Circle");
console.log("Master ID : " + master.getID());
console.log("Master Name : " + master.getName());
console.log("Master Name : " + master.getUniqueID());
Parameter
Name | Type | Optional | Description |
---|---|---|---|
name |
String |
|
- Returns
getMasterShortcuts()
MasterShortcut collection.
getMaxRelID()
get the max rel id in the collection. Parameters:name - @return {Number}
isExist(name) → boolean
Is exist master in the collection.
Example
var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("BasicShapes.vss");
// check master object by name
isPresent = diagram.getMasters().isExist("60 degree single");
console.log("Master Presence : " + isPresent);
Parameter
Name | Type | Optional | Description |
---|---|---|---|
name |
String |
|
- Returns
-
boolean
isExist(index) → boolean
Is exist item in the collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
index |
Number |
|
index of element. |
- Returns
-
boolean
isExistRelId(name) → boolean
Is exist master rel id in the collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
name |
|
|
- Returns
-
boolean
iterator() → Iterator
Supports a simple iteration over a nongeneric collection.
- Returns
-
Iterator
remove(master)
Remove the Master object from the collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
master |
|