MasterCollection

MasterCollection class

Master collection.

Properties

NameTypeDescription
MasterShortcutsMasterShortcutCollectionMasterShortcut collection.
Countint
Item (int)Master

Methods

NameDescription
addAdd the Master object in the collection.
removeRemove the Master object from the collection.
getMasterGets the element at the specified ID.
getMasterByNameGet master by name.
getMaxRelIDget the max rel id in the collection.
isExistRelIdIs exist master rel id in the collection.
isExistIs exist master in the collection.
clear
removeAt
iteratorReserved 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.

ParameterTypeDescription
masterMaster

remove(master)

Remove the Master object from the collection.

ParameterTypeDescription
masterMaster

getMaster(ID)

Gets the element at the specified ID.

ParameterTypeDescription
IDint

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.

ParameterTypeDescription
nameString

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.

ParameterTypeDescription
name

isExistRelId(relID)

Is exist master rel id in the collection.

ParameterTypeDescription
name

isExist(name)

Is exist master in the collection.

ParameterTypeDescription
nameString

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.