1

I am using an arcpy script tool to create an XY Event Layer from a text file and then save the layer to a .lyr. This works, but I also want to load a hyperlink file and apply it to the layer automatically. I tried using UpdateLayer, but this just replaces the entire layer, it doesn't keep the same source data. So, does anyone know if there is a way to load a .hlk file programmatically? The solution does not have to be in Python.

  • Wow, never heard of .hlk file in ArcGIS. Dare to share a link for more info? ;) – Alex Tereshenkov Apr 24 '14 at 19:26
  • 1
    So, a .hlk file is used to save hyperlink scripts in ArcGIS. If you have a layer in ArcGIS, go to the properties>Display tab. Under "Hyperlinks" check the "Support Hyperlinks" box and click the "Script" radio button. Then click the "Edit" button and you will see an editor similar to that in the Field Calculator functions. From there, you can Save and Load .hlk files. – jvangeld Apr 24 '14 at 19:36
  • 2
    ah, great thank you. Found it here: resources.arcgis.com/en/help/main/10.1/index.html#//…. Maybe you could update your questions with those details? You seem to be digging fairly deep :D – Alex Tereshenkov Apr 24 '14 at 20:08
  • 1
    At the moment I am writing a work-around. It will copy the features from the XY Event layer to a shapefile, then change the source of an existing layer file (with the hyperlink script already applied) to point at the new shapefile. – jvangeld Apr 24 '14 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.