Data Input/Output components "forget" network drives

At my work nearly all files are stored on various network drives. I use the “ghdata” format and the input and output components in grasshopper a lot. However the ghdata files I reference that live on network drives are “forgotten” when a script is closed and reopened.

A typical network path will look something like this:

“\\\TopLevel\Some Folder\Another Folder\mydata.ghdata”

This works fine when first linked, but when the document is closed and reopened the following warning will be generated:

“Source file location doesn’t exist: \TopLevel\Some Folder\Another Folder\mydata.ghdata”

It seems it is missing the url part of the path.

When this happens I have to re-link the path manually using right click → Source, which is a bit of a pain.

This seems to be the same/very similar to the issue as discussed here, which never got fully resolved.

Ok I have found something through looking at the xml. When I save the file as a ghx, the xml for the component path looks like this (look at the “RelativePath” field):

<items count="8">
                    <item name="Description" type_name="gh_string" type_code="10">Read a bunch of data from a file.</item>
                    <item name="Destination" type_name="gh_string" type_code="10">\\\TopLevel\Some Folder\Another Folder\mydata.ghdata</item>
                    <item name="Hidden" type_name="gh_bool" type_code="1">true</item>
                    <item name="InstanceGuid" type_name="gh_guid" type_code="9">5c34220c-61d1-4a2f-89de-fc61ac6cb080</item>
                    <item name="Name" type_name="gh_string" type_code="10">Data Input</item>
                    <item name="NickName" type_name="gh_string" type_code="10">Input</item>
                    <item name="RelativePath" type_name="gh_string" type_code="10">\\\TopLevel\Some Folder\Another Folder\mydata.ghdata|file:\\\TopLevel\Some Folder\Another Folder\mydata.ghdata</item>
                    <item name="UpdateDelay" type_name="gh_int64" type_code="4">9223372036854775807</item>

If I manually edit the ghx file and remove the “|file: …” from the RelativePath field, the file will open and the Data Input component will work.

The “|file: …” part of the relative path field is not present when I inspect the xml of the copied data input component, which would explain why copying and pasting works fine.