0

I have been trying to find a way to make it possible to import a file from my computer to the table of contents via a hyper link.

For example: We have organized a grid, so when I identify I get information of the file path to the Orthophoto for that grid square. When I manually have to go and find that folder and file among thousands of others. So instead of having to find the file and import it I would like to identify the grid square and that grid square should have a hyperlink as a field that, when clicked adds corresponding file to my table of contents.

I have quite a limited knowledge of scripting, but I have spent hours of googling and have not found any way to do it, the only thing I find is examples of scripts for opening files in web-browser and in external softwares as windows image viewer.

I want to click my hyperlink to add it to my map

2
  • 1
    If you're saying each feature already has the file path to your photo attributed to them, then perhaps using hyperlinks in ArcMap may be an easier solution? See the docs page from ESRI: desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/…
    – JClarkson
    Nov 23, 2020 at 10:28
  • well yes that is what i want to do, but i dont know how to get the hyperlink to add the assigned file in as a layer.
    – Geoarc
    Nov 23, 2020 at 12:45

1 Answer 1

0

I would recommend firstly you read through the ArcMap guidance on hyperlinks to understand your options.

https://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/using-hyperlinks.htm

In this case, I believe you will require the 'Document' option and point it to the field containing your file paths (ensure these are full paths with the extension too).

enter image description here

Also take note of the information in this related question which was in reference to ArcMap 10.2 (unclear if issue still remains):

If the default Windows application for an image file is Windows Image Viewer, the link opens correctly in ArcMap

If the default Windows application for an image file is Paint, the link doesn't work

I tested myself in ArcMap 10.6 and this behaviour worked as expected. If you need more advanced behaviour then you will need to use the 'Script' option, but for what you are asking the 'Document' function should be sufficient and therefore require no scripting!

2
  • ok, thank you for your reply. I have read the guidance on hyperlinks but for me it seems that there is only the option to open the images in external programs, like you say in windows image viewer. I want to add it to my map as a layer in arcmap not open the image in another software. feeling really stupid, am I missing something?
    – Geoarc
    Nov 23, 2020 at 16:04
  • Sorry that's all I can offer, beyond that I am unsure. Keep trying though, there will be a solution, most likely via a script upon reflection.
    – JClarkson
    Nov 23, 2020 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.