Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("RetrieveMasterInfo.vdx"); masters = diagram.getMasters(); for (var it = masters.iterator(); it.hasNext();) { master = it.next(); // Display information about the masters console.log("\nMaster ID : " + master.getID()); console.log("Master Name : " + master.getName()); }
Property Getters/Setters Summary | ||
---|---|---|
function | getCount() | |
Gets the number of elements actually contained in the collection. | ||
function | getMasterShortcuts() | |
MasterShortcut collection. | ||
function | get(index) | |
Gets the element at the specified index. |
Method Summary | ||
---|---|---|
function | add(master) | |
Add the Master object in the collection. | ||
function | clear() | → inherited from Collection |
Removes all elements from collection. | ||
function | getMaster(ID) | |
Gets the element at the specified ID. | ||
function | getMasterByName(name) | |
Get master by name. | ||
function | getMaxRelID() | |
get the max rel id in the collection. | ||
function | isExist(index) | → inherited from Collection |
Is exist item in the collection. | ||
function | isExist(name) | |
Is exist master in the collection. | ||
function | isExistRelId(relID) | |
Is exist master rel id in the collection. | ||
function | iterator() | → inherited from Collection |
Supports a simple iteration over a nongeneric collection. | ||
function | remove(master) | |
Remove the Master object from the collection. |
Property Getters/Setters Detail |
---|
getMasterShortcuts : MasterShortcutCollection | |
function getMasterShortcuts() |
getCount : Number | |
function getCount() |
get : Master | |
function get(index) |
index
- Method Detail |
---|
add | |
function add(master) |
master: Master
- remove | |
function remove(master) |
master: Master
- getMaster | |
function getMaster(ID) |
ID: Number
- 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 | |
function getMasterByName(name) |
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 | |
function getMaxRelID() |
name
- isExistRelId | |
function isExistRelId(relID) |
name
- isExist | |
function isExist(name) |
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);
iterator | |
function iterator() |
isExist | |
function isExist(index) |
index: Number
- index of element.clear | |
function clear() |