<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>You can do it in ModelBuilder…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>There is a ModelBuilder only tool called Parse Path. >From a new model (editing window) right-click in and go to Model Only Tools, then choose the Parse Path tool. Choose the option for path. This gives you the: c:\whatever\wherever\maybeinadbsomewhere.gdb value. This variable will be called value by default.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>The next part is that you want to get the name of the source image. We will get that from the model iterator: Iterate Datasets (This is a ModelBuilder only feature, as well, so you will have to right-click and go this time to Model Iterators to choose it). You are going to set the data type to Rasters because those are the only files you are interested in, and then you are going to set the top level folder/workspace location that contains all of the images (Workspaces can also be geodatabases). You also have the option to make the model run recursively within the selected folders which will dig deeper and deeper until all subfolders/data have been exhausted (If you were in a geodatabase the equivalent would be feature datasets). So that is great, and as an output it gives you the name of the raster as well. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>We are going to call on this later to create the field calculation for your attribute table: “c:\whatever\wherever\maybeinadbsomewhere.gdb\yourraster.format” However, to get the values collected by the “value” and “name” variables of each iteration we are going to use what is called variable substitution. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>In the calculate field tool you will specify the field you want to calculate and then the calculation will be: “%value%\%name%” It needs to be in quotes because the values are strings, and you need to add the backslash because it is not included in the value variable from the Parse Paths tool. This makes the folder path work properly. The name variable may not contain the file format in which case you need to change the calculation to: “%value%\%name%.tif” for example.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Now you just need to do a few things, first add the hyperlink field to your data, then apply the calculation above, to the appropriate record in your table. To do this you will need a selection geoprocessing tool such as Make Table View with the definition query set to [Your Field] = %name% this will select only the appropriate row, and then you run the calculate field tool w/ the expression discussed above.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>So now you have a tool that will update a table. Not sure if this will work for your case, but best of luck!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>There is a very good geoprocessing blog hosted by ESRI that may be a resource worth looking in to: </span><span style='font-family:"Calibri","sans-serif"'><a href="http://blogs.esri.com/Dev/blogs/geoprocessing">http://blogs.esri.com/Dev/blogs/geoprocessing</a> <i>Look for articles by Shitij Mehta and you will find excellent information on iteration and I believe variable substitution.</i></span><i><o:p></o:p></i></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><img border=0 width=1284 height=1000 id="Picture_x0020_1" src="cid:image001.png@01CCBB2F.9B91EA70"></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Tahoma","sans-serif"'>Jason A. Griffin</span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>, Ext. 33613</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <span style='color:gray'>| BTS Senior Technology Specialist, GIS Dev. | Pinellas County Government, Business Technology Services [BTS] | 400 S Ft. Harrison Ave | Clearwater, FL 33756 | </span>Tel: 727-453-3613 <span style='color:gray'>| Cell: 727-600-6634 | <a href="mailto:JGriffin@co.pinellas.fl.us">JGriffin@co.pinellas.fl.us</a>|<o:p></o:p></span></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> shrug-l-bounces@lists.dep.state.fl.us [mailto:shrug-l-bounces@lists.dep.state.fl.us] <b>On Behalf Of </b>Jeffrey Reed<br><b>Sent:</b> Thursday, December 15, 2011 10:50 AM<br><b>To:</b> shrug-l@lists.dep.state.fl.us<br><b>Subject:</b> shrug-l: Field Calculating SQLserver paths for hyperlinking images<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>I'm working on ARC10 and we have images on a SQL server and I want to field calculate their paths that way the images are hyperlinked inside the attribute table. I've read through ARC's help on the subject, but they don't have any examples to help me with the code. So shruggers.........anyone have any help for me? Whether it's a link or just some suggestions, I'll take it. Thanks.<br clear=all><br>-- <br>Jeffrey Reed<br>GIS <br>Information Technology Department/Emerald Coast Utilities Authority <br>P.O. Box 15311<br>9300 Sturdevant Street<br>Pensacola, FL 32514 <br>(850)-969-6672<o:p></o:p></p></div></body></html>