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