Constructor.

Example

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
diagram = new aspose.diagram.Diagram("Hyperlinks.vsdx");
// get page by name
var page = diagram.getPages().getPage("Page-1");
// get shape by ID
var shape = page.getShapes().getShape(2);
// initialize Hyperlink object
var hyperlink = new aspose.diagram.Hyperlink();
// set address value
hyperlink.getAddress().setValue("https://www.aspose.com/");
// set sub address value
hyperlink.getSubAddress().setValue("Sub address here");
// set description value
hyperlink.getDescription().setValue("Description here");
// set name
hyperlink.setName("MyHyperLink");
// add hyperlink to the shape
shape.getHyperlinks().add(hyperlink);
diagram.save("out-AddHyperlinkToShape.vsdx", aspose.diagram.SaveFileFormat.VSDX);

Methods

deepClone() → Object

Creates deep copy of this instance.

Returns

Object 

getAddress()

Specifies a URL address, DOS file name, or UNC path to jump to.

getDefault()

Specifies the default hyperlink for a shape or page.

getDel()

A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally. The value of the property is BOOL integer constant.

getDescription()

Description element contains a text string that describes the hyperlink.

getExtraInfo()

Contains information to be used in resolving a URL, such as the coordinates of an image map. For example, x=41 y=7 would specify the coordinates of an image map.

getFrame()

Contains the name of a frame to target when Microsoft Visio is open as an active document in a container application. The default is an empty string.

getID()

The unique ID of the element within its parent element.

getInvisible()

Invisible element indicates whether a hyperlink appears on the shortcut menu for a shape or page.

getName()

The name of the element.

getNameU()

The universal name of the element.

getNewWindow()

Specifies whether Microsoft Visio opens a window in a new location when it follows a hyperlink to open a Web page or another Visio document.

getSortKey()

Invisible element indicates whether a hyperlink appears on the shortcut menu for a shape or page.

getSubAddress()

Specifies a location within the target document to link to.

setDel()

A flag indicating whether the element has been deleted locally. A value of 1 indicates that the element was deleted locally. The value of the property is BOOL integer constant.

setID()

The unique ID of the element within its parent element.

setName()

The name of the element.

setNameU()

The universal name of the element.