<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CurDir function in Hyperlink VBScript? in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376827#M4001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestions and my apologies for not replying sooner (I thought I had my notification turned on).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried specifying a relative path (i.e. leaving off the path for a file in the same directory as the project file) as suggested but with no success. I did note that the help was for 9.3 not 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Nov 2011 21:16:27 GMT</pubDate>
    <dc:creator>PaulDownie</dc:creator>
    <dc:date>2011-11-17T21:16:27Z</dc:date>
    <item>
      <title>CurDir function in Hyperlink VBScript?</title>
      <link>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376824#M3998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope someone might be able to help me out with an issue I have with a Hyperlink VBScript. Prior to version 10 I was using a Visual Basic macro with the Hyperlink tool to launch an Access database and load a database record associated with the selected point. In that macro I could use the CurDir function to return the directory containing my ArcMap project. This allowed me to distribute the project and database as a package to others to use without the need to alter the script. The CurDir function doesn't return a value in my VBScript. Can anyone tell me if this should or shouldn't be working in VBScript and if it doesn't work in VBScript, suggest some alternative to accomplish the same result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 13:26:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376824#M3998</guid>
      <dc:creator>PaulDownie</dc:creator>
      <dc:date>2011-11-09T13:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: CurDir function in Hyperlink VBScript?</title>
      <link>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376825#M3999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was curious so I did some searching.&amp;nbsp; I found:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sCurPath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this returns the path relative to the ArcGIS install (i.e., the bin directory).&amp;nbsp; I'm not sure how you would do this with vbScript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For 10.0, have you tried setting your image names to be relative paths.&amp;nbsp; For example,&amp;nbsp; "imageFolder\imageName.tif".&amp;nbsp; See&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Adding_hyperlinks_to_features&amp;amp;anchor=cs272085"&gt;http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Adding_hyperlinks_to_features&amp;amp;anchor=cs272085&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At 10.1 we are going to support Python as a scripting choice and with that you'll have some more options.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 14:00:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376825#M3999</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-11-10T14:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: CurDir function in Hyperlink VBScript?</title>
      <link>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376826#M4000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Again, try the 10.0 suggestion above but if curious, this is what my 10.1 hyperlink python code block looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os, webbrowser
def OpenLink( [HyperLink] )
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument("current")
&amp;nbsp;&amp;nbsp;&amp;nbsp; mxdFolder = os.path.dirname(mxd.filePath)
&amp;nbsp;&amp;nbsp;&amp;nbsp; fullPath = os.path.join(mxdFolder, [Hyperlink])
&amp;nbsp;&amp;nbsp;&amp;nbsp; webBrowser.open(fullPath)
&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:24:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376826#M4000</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2021-12-11T17:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: CurDir function in Hyperlink VBScript?</title>
      <link>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376827#M4001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestions and my apologies for not replying sooner (I thought I had my notification turned on).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried specifying a relative path (i.e. leaving off the path for a file in the same directory as the project file) as suggested but with no success. I did note that the help was for 9.3 not 10.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 21:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/curdir-function-in-hyperlink-vbscript/m-p/376827#M4001</guid>
      <dc:creator>PaulDownie</dc:creator>
      <dc:date>2011-11-17T21:16:27Z</dc:date>
    </item>
  </channel>
</rss>

