MasterCollection
Contents
[
Hide
]MasterCollection class
Master collection.
Properties
| Name | Type | Description |
|---|---|---|
| MasterShortcuts | MasterShortcutCollection | MasterShortcut collection. |
| Count | int | |
| Item (int) | Master |
Methods
| Name | Description |
|---|---|
| add | Add the Master object in the collection. |
| remove | Remove the Master object from the collection. |
| getMaster | Gets the element at the specified ID. |
| getMasterByName | Get master by name. |
| getMaxRelID | get the max rel id in the collection. |
| isExistRelId | Is exist master rel id in the collection. |
| isExist | Is exist master in the collection. |
| clear | |
| removeAt | |
| iterator | Reserved for internal use. |
MasterCollection.MasterShortcuts property
MasterShortcut collection.
Type: MasterShortcutCollection
MasterCollection.Count property
Type: int
MasterCollection.Item (int) property
Type: Master
add(master)
Add the Master object in the collection.
| Parameter | Type | Description |
|---|---|---|
| master | Master |
remove(master)
Remove the Master object from the collection.
| Parameter | Type | Description |
|---|---|---|
| master | Master |
getMaster(ID)
Gets the element at the specified ID.
| Parameter | Type | Description |
|---|---|---|
| ID | int |
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 |
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());
getMaxRelID()
get the max rel id in the collection.
| Parameter | Type | Description |
|---|---|---|
| name |
isExistRelId(relID)
Is exist master rel id in the collection.
| Parameter | Type | Description |
|---|---|---|
| name |
isExist(name)
Is exist master in the collection.
| Parameter | Type | Description |
|---|---|---|
| name | String |
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);
clear()
removeAt(index)
iterator()
Reserved for internal use.