Links
There are two types of Links you can create— Internal Document Links (Inter-Document Links) and External Links (Web URL Links).
Internal Document Links
Internal Document Links let you jump to a sheet or to a region on a sheet in a PDF document. Links cannot jump from one PDF document to another. Before a link can work, you must define a marker. A marker defines a sheet or a rectangular region in a drawing sheet. Internal Document Links jump to the sheet or region defined by the marker. A special marker is created for each sheet in the document. This marker is named using the sheet_name keyword.
Markers need not reside on the same sheet as the link; it may reside in another sheet in the same PDF document. In a typical engineering drawing, the detailed sections may be in a separate sheet. Linking ties or binds separate drawing sheets together in the PDF document or plan set.
When you move the mouse over a link, the cursor changes from an arrow to a finger. The viewer may not be able to detect a mouse over if you move the mouse too quickly. Clicking on the link causes the viewer to display the region defined by the marker fit-adjusted by the zoom_percentage value. No attempts are made to verify the validity of the marker. This may result in a dangling or unresolved link.
For all links, you should set the action_item keyword to link. The action_name keyword specifies a unique name to identify the link. When you create an Internal Document Link, you must set the action_type keyword to document. The action_spec keyword specifies the marker name (sheet_name.marker_name).
The following table displays the required/default values for the action keywords when you create an Inter-Document link.
Keyword | Value | Default Value |
---|---|---|
action_item | LINK | Required |
action_name | Unique name used as identifier for link. | Required |
action_type | DOCUMENT | Required |
action_spec | String that specifies the explicit name of the marker (i.e. sheet_name.marker_name or sheet_name) | Required |
action_range | ELEMENT_RANGE | CELL_RANGE | ELEMENT_RANGE |
action_instance | SINGLE_INSTANCE | MULTIPLE_INSTANCE | SINGLE_INSTANCE |
Example:
! Create a Link to a Marker,and a Bookmark to the link. if (type .eq. text) then if (characters .eq. "STEP DETAIL") then action_item = link action_name = "steps" action_type = DOCUMENT action_spec = "AR2.steps" !(sheet_name.marker_name) endif endif ! Create a Marker region using a cell if ( cellname eq "steps" ) then action_item = marker action_name = cellname action_type = destination action_range = CELL_RANGE zoom_percentage = 140 !Zoom 140 percent ! Create a bookmark to navigate to this location action_item = bookmark action_name = "Step Link" action_type = AREA_OF_INTEREST action_spec = "./Details Link" endif
The design script example above creates the following link and bookmark.
Markers
A marker defines a rectangular region in a drawing sheet. Internal Document Links jump to the region defined by the marker. A special marker is created for each sheet in the document. This marker is named using the sheet_name keyword. For markers, you should set the action_item keyword to marker.
The action_name keyword specifies a unique name for the marker. The software prepends the sheet name to the marker name. The fully qualified marker name is sheet_name.marker_name. The link must use the fully qualified marker name as its destination. When you create a marker, you must set the action_type keyword to destination.
The zoom_percentage keyword scales the rectangular region of the marker item. This enables you to control how much of the marker’s surrounding region is displayed when you click a link.
The following table displays the required/default values for the action keywords when you create a marker.
Keyword | Value | Default Value |
---|---|---|
action_item | MARKER | Required |
action_name | Unique name for the marker. | Required |
action_type | DESTINATION | Required |
action_spec | Not applicable | Not Applicable |
action_range | ELEMENT_RANGE | CELL_RANGE | ELEMENT_RANGE |
action_instance | SINGLE_INSTANCE | SINGLE_INSTANCE |
Example:
! Create a Marker, an Inter-Document Link, and a Bookmark to the link. ! ! Create a Marker region using a cell if ( cellname eq "steps" ) then action_item = marker action_name = cellname action_type = destination action_range = CELL_RANGE zoom_percentage = 140 !Zoom 140 percent endif if (type eq text) then if (characters eq "STEP DETAIL") then ! Create a document link action_item = link action_name = "steps" !Name or ID action_type = DOCUMENT ! Use an explicit marker name (i.e. sheet_name.marker_name) action_spec = "cb3.steps" ! where it should link to ! Create a bookmark to navigate to this location action_item = bookmark action_name = "Step Link" action_type = AREA_OF_INTEREST action_spec = "./Details Link" endif endif
Web URL Links
Web URL Links let you create links that jump to a Web page. This feature is useful when linking sections of the sheet to information stored in a managed environment like ProjectWise.
For all links, you should set the action_item keyword to link. The action_name keyword specifies a unique name to identify the link. When you create an Web URL Link, you must set the action_type keyword to web_url. The action_spec keyword specifies the URL address.
The following table displays the required/default values for the action keywords when you create a Web link.
Keyword | Value | Default Value |
---|---|---|
action_item | LINK | Required |
action_name | Unique name used as an identifier for the link. | Required |
action_type | WEB_URL | Required |
action_spec | String that specifies the URL address. | Required |
action_range | ELEMENT_RANGE | CELL_RANGE | ELEMENT_RANGE |
action_instance | SINGLE_INSTANCE | MULTIPLE_INSTANCE | SINGLE_INSTANCE |
Example:
! Create a Web URL Link and a Bookmark to this link. ! if (characters eq "COMMONWEALTH OF PENNSYLVANIA") then action_item = link action_name = "penndot" action_type = web_url action_spec = "http://www.dot.state.pa.us/" action_item = bookmark action_name = "PENNDOT LINK" action_spec = "./weblinks" endif
The design script example above creates the following WEB URL link and bookmark.