Hyperlink Tool

1893
9
04-25-2017 01:19 PM
Highlighted
New Contributor III

Has anyone developed a 'Hyperlink Tool' add-in with ArcGIS Pro SDK that can grab a url or path in a field of an attribute table and open the file in a directory or open the link in a browser?  I need a tool that can serve the same function as the hyperlink tool that comes with ArcMap.
Thanks

9 Replies
Highlighted
Occasional Contributor

I didn't develop a tool but I did figure out how to use "Configure Pop-ups" on a layer to work as a hyperlink tool - hope this'll help anyone looking for the old ArcMap desktop hyperlink tool in ArcGIS Pro.

In the Contents pane, right-click on the layer to be hyperlinked and click on "Configure Pop-ups."  Click on the Image icon along the top, which will add a new line below Fields as shown below.  

Click on the pencil to edit the newly added reference.  Give any title.  I'm going after utility as-built mapping so I called it "View As-built."  Then, don't ask me why, but under both Source URL and hyperlink I had to add the URL (similar to ArcMap's "Map Document Properties" Hyperlink base: value.  So it's the path to where the document is stored, less the file name (i.e. https://www.myserver/myfiles/" or in my case, since I'm opening a pdf document within my domain its \\myserver\myfiles\").  Apparently if you use the http reference it defaults to IE and you can't change this to something more stable such as Chrome.

Now add the field reference from the attribute table to your URL string.  My field name is IMAGEPATH so I add it as {IMAGEPATH}.  Click the Back arrow to finish your edits.

ID a feature and you'll get the ID window to popup and at the bottom will be your link (in the image below it's the black and white X - I imagine you can put in image in here to make it look fancy but who has time?). 

Highlighted
Esri Regular Contributor

Hi Patrick, thanks for posting this!

Reply
0 Kudos
Highlighted
New Contributor III

Hi Patrick,

Thanks for the detailed steps. 

Image Options > Source URL is for the image you want to display in the pop-up window. Hyperlink is where you provide the URL or path to document you want to display when clicking on the image in the pop-up window.

Source URL and Hyperlink do not have to be the same value.

Also please note that you could also add a Text element to the pop-up and add a hyperlink there instead of adding an Image element if you do not want to show an image in the pop-up. When you edit the Text element, in the Text Options pane the Hyperlink button is the one on the far right. Click on it and specify the hyperlink. This hyperlink will display at the top in the pop-up window.

Thanks.

Reply
0 Kudos
Highlighted
New Contributor III

That's a great work-around, but what if my attribute table already has the image path/name in a field and it is for multiple images stored in multiple directories? For example, I have a file GDB of geotagged photos that pulls from several locations. In ArcMap, I was able to use the Identify tool and click on the hyperlinked path to open the photo. In ArcGIS Pro, the path is no longer hyperlinked. Is there a way to make this work again?

Reply
0 Kudos
Highlighted
New Contributor III

Hi Charley - so you have an attribute field with full-path to images and you want these images displayed when you identify a feature? For this doesn't just specifying {FIELD_NAME} as the URL work?

Say your attribute field is called "Image_Field" then in the pop-up configuration page for the layer add an IMAGE element and in the URL input box type in {Image_Field}

I think this should work.

Thanks.

Highlighted
New Contributor III

That does work! However, the image is tiny. I need it to open with my default image application. Is this possible?

Reply
0 Kudos
Highlighted
New Contributor III

Try adding {Image_Field} as the Hyperlink in pop-up configuration for the image element. So URL and Hyperlink will both have the same value.

When you identify the feature, pop-up will show the image but if you click on the image it should then open up with IE and should be larger in size. Currently the default image application is not used.

Thanks.

Highlighted
New Contributor III

Perfect! Thanks for your help!

Reply
0 Kudos
Highlighted
Occasional Contributor

i followed this blog for 'file open' hyperlinks:

The Power of the Pro Pop-up 

the "file:///.../.../..." method seems to work in both ArcMap and ArcGIS Pro.

for now...