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);
Constructor Summary |
---|
Hyperlink()
Constructor. |
Property Getters/Setters Summary | ||
---|---|---|
function | getAddress() | |
Specifies a URL address, DOS file name, or UNC path to jump to. | ||
function | getDefault() | |
Specifies the default hyperlink for a shape or page. | ||
function | getDel() | |
function | setDel(value) | |
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. | ||
function | getDescription() | |
Description element contains a text string that describes the hyperlink. | ||
function | 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. | ||
function | 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. | ||
function | getID() | |
function | setID(value) | |
The unique ID of the element within its parent element. | ||
function | getInvisible() | |
Invisible element indicates whether a hyperlink appears on the shortcut menu for a shape or page. | ||
function | getName() | |
function | setName(value) | |
The name of the element. | ||
function | getNameU() | |
function | setNameU(value) | |
The universal name of the element. | ||
function | 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. | ||
function | getSortKey() | |
Invisible element indicates whether a hyperlink appears on the shortcut menu for a shape or page. | ||
function | getSubAddress() | |
Specifies a location within the target document to link to. |
Method Summary | ||
---|---|---|
function | deepClone() | |
Creates deep copy of this instance. |
Constructor Detail |
---|
function Hyperlink()
Property Getters/Setters Detail |
---|
getName/setName : String | |
function getName() / function setName(value) |
getNameU/setNameU : String | |
function getNameU() / function setNameU(value) |
getID/setID : Number | |
function getID() / function setID(value) |
getDel/setDel : Number | |
function getDel() / function setDel(value) |
getDescription : Str2Value | |
function getDescription() |
getAddress : Str2Value | |
function getAddress() |
getSubAddress : Str2Value | |
function getSubAddress() |
getExtraInfo : Str2Value | |
function getExtraInfo() |
getFrame : Str2Value | |
function getFrame() |
getNewWindow : BoolValue | |
function getNewWindow() |
getDefault : BoolValue | |
function getDefault() |
getInvisible : BoolValue | |
function getInvisible() |
getSortKey : Str2Value | |
function getSortKey() |
Method Detail |
---|
deepClone | |
function deepClone() |