Select to view content in your preferred language

ArcGIS Explorer Desktop Layers & Hyperlink

5738
8
Jump to solution
07-25-2014 02:03 PM
MattHeineman
Regular Contributor

Like many, I am attempting to implement ArcGIS Explorer on laptops with lots of PDF files.

Everything works fine in ArcGIS Desktop regarding hyperlinking. I even have the hyperlink as easy as C:\GIS\Scans\QSMap55.pdf.

I attempted exporting my layers (in Groups in ArcGIS) as Group Layer Packages as well as Layer Packages (i.e. SewerMain.lpk). In all events, the hyperlinking is not working and I do not see any "Popup Content" options in the Layer Properties in ArcGIS Explorer. The filepath is legit, it's simply a text line.

What am I doing wrong? I'm running ArcGIS Explorer Build 2500 on both a Windows 7 (64 bit) and Windows XP machine.

Thanks in advance!

Matt

Tags (1)
1 Solution

Accepted Solutions
MarkBockenhauer
Esri Regular Contributor

Matt,


You could try the following:

<xsl:when test="FieldValue[contains(., '.pdf')]">

  <a target="_blank">

  <xsl:attribute name="href">

  <xsl:value-of select="'file:///C:/Users/folder/Documents/'"/><xsl:value-of select="FieldValue"/>

  </xsl:attribute>

  <xsl:value-of select="FieldValue"/>

  </a>

</xsl:when>

-Mark

View solution in original post

0 Kudos
8 Replies
MarkBockenhauer
Esri Regular Contributor

I put a layer package with 3 examples at http://www.arcgis.com/home/item.html?id=81b39307fde04dd99656f3e19e4e0715

Basically for an attribute you can use    file:///C:/Users/folder/Documents/whatever.pdf‌

Using the HTML popup you can do a lot of things to get the look that you want, and ArcGIS Explorer desktop will display it.

0 Kudos
MattHeineman
Regular Contributor

Hi Mark, thanks for the help.

I looked at your data, and I can see the Hyperlink. However, when I mimicked your attribute file structure of file:///C:/, I did

not get the same results.

ArcGX Attribute Screenie.jpg

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Matt,

To make sure you don't have any typos in your attribute you should be able to copy and paste your Project Drawing Hotlink attribute into a web browser address bar and see the correct result.

Did you also update the HTML Popup property for the layer in ArcMap?

You need to add this:

<xsl:when test="FieldValue[starts-with(., 'file')]">

  <a target="_blank">

  <xsl:attribute name="href">

  <xsl:value-of select="FieldValue"/>

  </xsl:attribute>

  <xsl:value-of select="FieldValue"/>

  </a>

  </xsl:when>

In the <xsl:template match="Field">  section of the XSL template.  (load the default template on the property dialog if you have not already).

You could also just copy the HTML Popup properties from the  PDF Hyper Link layer in the layer package I referenced above.

Mark

0 Kudos
MattHeineman
Regular Contributor

Hi Mark,

I'm working on the XSL coding in the HTML Popup properties now. I'm not a programmer anymore (not since Avenue!), so I'm trying to figure this out. I find this a frustrating process for something that seems like it should be simpler.

Here's my dilemma, my hyperlinked attribute is already set-up for a Hyperlink Script in ArcGIS. The reason is my data is on a really long network path, so I cut off the majority of the filepath and added it to the path variable like so...

Function OpenLink ([PrjDrawing])

Dim objShell

Dim path     (i.e. RecordDrawing1.pdf)

path = "\\SERVER\Directory\Directory\Directory\Directory\"&[PrjDrawing]

..you get the idea I'm sure

This process cleared up a lot of repetitive clutter in my geodatabase. I'd like this same process in ArcGIS Desktop. Can I concatenate the "C:\Directory\Directory\" to my attribute field value in the XSL as well so I don't have to change my attribute values in the database to satisfy disconnected map use in Explorer Desktop?

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Matt,


You could try the following:

<xsl:when test="FieldValue[contains(., '.pdf')]">

  <a target="_blank">

  <xsl:attribute name="href">

  <xsl:value-of select="'file:///C:/Users/folder/Documents/'"/><xsl:value-of select="FieldValue"/>

  </xsl:attribute>

  <xsl:value-of select="FieldValue"/>

  </a>

</xsl:when>

-Mark

0 Kudos
MattHeineman
Regular Contributor

I'll give that a try tomorrow when i'm back in the office. I was exploring the Concat function with zero success.

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Matt,

Another note on this.. If the value of your attribute does not contain ".pdf"  you can also just specify the actual fieldname directly.  In your case it would be Project Drawing Hotlink.

<xsl:when test="FieldName[starts-with(., 'Project Drawing Hotlink')]">

<a target="_blank">

<xsl:attribute name="href">

<xsl:value-of select="'file:///C:/Users/folder/Documents/'"/>

<xsl:value-of select="FieldValue"/>

</xsl:attribute>

<xsl:value-of select="FieldValue"/>

</a>

</xsl:when>

Mark

0 Kudos
MattHeineman
Regular Contributor

Hi Mark

That did it! I realized one of my problems was I was exporting the layer package and then simply Refreshing the layer in ArcGIS Desktop Explorer. I realized I needed to remove the layer and re-add it.

Here is my final code:

<xsl:when test="FieldValue[contains(., '.pdf')]">

<a target="_blank">

<xsl:attribute name="href">

<xsl:value-of select="'file:///C:/GIS/ScannedDocuments/'"/>

<xsl:value-of select="FieldValue"/>

</xsl:attribute>

<xsl:value-of select="FieldValue"/>

</a>

</xsl:when>

I appreciate the help,

Matt

0 Kudos