Table of Contents

CadHyperlinks

from OpenCAD2D import CadHyperlinks

class CadHyperlinks(System.Object) ยท CadHyperlinks in the .NET reference

The hyperlinks of objects, as AutoCAD 2021 keeps and follows them: kept in the extended data of PE_URL (DxfEntity.Hyperlinks), the address, the text it is shown by and the named place in it; a link to a view of the drawing has no address and the view as its place; an e-mail address is written mailto: with its subject after ?subject=. These helpers say where a hyperlink leads, how its tooltip reads and which objects have one.

Properties and fields

FollowHint

.NET

FollowHint: ClassVar[str]

The words under a hyperlink's text in the tooltip the cursor shows over its object, as AutoCAD writes them.

MaxLength

.NET

MaxLength: ClassVar[int]

The longest address, text to display or named place AutoCAD takes: 255 characters.

Methods

First

.NET

@staticmethod
def First(entity: DxfEntity) -> DxfHyperLink

Gets the first hyperlink of an object, as Ctrl+click follows it; null for an object with none, or none given.

Make

.NET

@staticmethod
def Make(address: str, place: str, text: str) -> DxfHyperLink

Makes the hyperlink the dialogs and -HYPERLINK write from what they ask: the address, the named place in it and the text it is shown by. An empty address with a place is a link to a view of the drawing.

Resolve

.NET

@staticmethod
def Resolve(document: CadDocument, link: DxfHyperLink) -> CadHyperlinkTarget

Says where a hyperlink leads. An address with a scheme (https:, ftp:) or starting www. is a web address, one starting mailto: a mail address; no address with a place named is a view of the drawing; any other address is a file, a relative path one made from the drawing's hyperlink base (DxfDatabase.HyperlinkBase) or, where the base is empty, the folder of the drawing's file.

Tooltip

.NET

@staticmethod
def Tooltip(entity: DxfEntity) -> str

Gets the text of the tooltip the cursor shows over an object with a hyperlink: what the first hyperlink is shown by (its text, else its address), then CadHyperlinks.FollowHint on the next line; null for an object with none.