Set URL Link
The Set URL Link function attaches a World Wide Web URL to the geometric primitives that follow.
|Opcode format||Opcode||Operand Format||Comments|
|Extended ASCII||(URL||<ws><TURL>)||Assigns (or removes) a URL to or from the following primitives.|
URL An ASCII text string that is to be attached to subsequent geometric primitives.
Any of the geometric primitives that can be drawn using DWF (lines, markers, etc.) can also have a URL attached to them. A DWF reading application can thereby allow a user to click on a geometric primitive in the scene and execute the attached URL with an Internet browser.
A URL is attached to a specific set of geometric primitives by surrounding the corresponding draw functions with a pair of Set URL Link opcodes. The first of the pair is set with a URL specified and the second with a null URL:
L 0,0 15,15 No URL is attached to this line
(URL http://www.autodesk.com) The URL will be attached to subsequent geometry
L 10,10 35,35 A URL is attached to this line
L 0,10 30,30 A URL is attached to this line
(URL) No URL will be attached to subsequent geometry
L 0,20 20,20 No URL is attached to this line
As with other attributes, only one URL is active at a time. If a URL is active in a .dwf file and a second URL is specified, only the later URL applies to subsequent geometric primitives.
Formats of the URL to perform DWF reader specific triggers are listed in the following:
How to allow multiple DWFs to be overlaid and stitched together is best illustrated with an example:
You start with a low resolution map of the USA. As the user zooms in, more detailed .dwf files are loaded from the server (URL triggered) that are drawings of specific states. If the user pans this zoomed-in view so that he/she can see the border between two states, then the two .dwf files need to be loaded and displayed (stitched/overlaid) together. All this happens relative to the coordinate system of the original map.
A geometric primitive has a maximum of one URL attached to it.
A URL may be attached to geometric primitives that are invisible (see the Set Visibility function). A DWF reading application should allow the user to select such invisible geometry and execute the attached URL. This is useful, for example, when you want a URL executed whenever the user clicks in a general region of an image, but displaying the "hot" region would interfere with the illustration.
By default the "URL Link" attribute is inactive (no URL is attached to subsequent geometry), which is equivalent to executing the opcode
Implementation in WHIP! Versions
|Set URL Link||