Add Hyperlink to a Shape


how can I add an Hyperlink to a Shape?


Hi Chris,

Thanks for your inquiry. Please try the following source code below:

//load diagram

Diagram diagram = new Diagram("sample.vdx");

//initialize Hyperlink oobject

Hyperlink hyperlink = new Hyperlink();

//set address value

hyperlink.Address.Value = "";

//set sub address value

hyperlink.SubAddress.Value = "Sub address here";

//set description value

hyperlink.Description.Value = "Description here";

//set name

hyperlink.Name = "MyHyperLink";

//add hyperlink to the shape


//save to local space

diagram.Save("Output.vdx", SaveFileFormat.VDX);

I hope it helps. Please do let me know in case of further assistance or questions.