MasterCollection
Contents
[
Hide
]MasterCollection class
Master collection.
Methods
| Name | Description |
|---|---|
| add(master) | Add the Master object in the collection. |
| clear() | |
| get() | |
| getCount() | |
| getMaster(ID) | Gets the element at the specified ID. |
| getMasterByName(name) | Get master by name. |
| getMasterShortcuts() | MasterShortcut collection. |
| getMaxRelID() | get the max rel id in the collection. Parameters:name - @return {Number} |
| isExist(name) | Is exist master in the collection. |
| isExistRelId(name) | Is exist master rel id in the collection. |
| iterator() | Reserved for internal use. |
| remove(master) | Remove the Master object from the collection. |
| removeAt() |
add(master)
Add the Master object in the collection.
| Parameter | Type | Description |
|---|---|---|
| master | Master |
Returns: Number — Number
clear()
get()
getCount()
getMaster(ID)
Gets the element at the specified ID.
| Parameter | Type | Description |
|---|---|---|
| ID | Number |
Returns: Master — Master
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());
getMasterByName(name)
Get master by name.
| Parameter | Type | Description |
|---|---|---|
| name | String |
Returns: Master — Master
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());
getMasterShortcuts()
MasterShortcut collection.
getMaxRelID()
get the max rel id in the collection. Parameters:name - @return {Number}
isExist(name)
Is exist master in the collection.
| Parameter | Type | Description |
|---|---|---|
| name | String |
Returns: boolean — boolean
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);
isExistRelId(name)
Is exist master rel id in the collection.
| Parameter | Description |
|---|---|
| name |
Returns: boolean — boolean
iterator()
Reserved for internal use.
remove(master)
Remove the Master object from the collection.
| Parameter | Type | Description |
|---|---|---|
| master | Master |