<?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: File Manager Add-On &amp;amp; UNC Paths in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128026#M14166</link>
    <description>Thanks for the replies and the ideas ... something for me to think over. At the moment we are unable to store the files alongside the project - the company directive is for them to be on the UNC path server, failing that on the ArchiCAD Data folder. &lt;BR /&gt;
&lt;BR /&gt;
We also have local and teamwork files &amp;amp; perform a test in a master_gdl object to identify if it is local pln or teamwork file, and set other file locations on this information.</description>
    <pubDate>Thu, 14 Mar 2013 10:00:56 GMT</pubDate>
    <dc:creator>Danny Sparks-Cousins</dc:creator>
    <dc:date>2013-03-14T10:00:56Z</dc:date>
    <item>
      <title>File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128020#M14160</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi All,&lt;BR /&gt;
&lt;BR /&gt;
We need to write out some data files from GDL objects to specific locations depending on network connections to office servers etc.&lt;BR /&gt;
&lt;BR /&gt;
I would like to be able to use the File Manager Add-On to check if a UNC path exists, if not then to set the file location to the ArchiCAD Data folder.&lt;BR /&gt;
&lt;BR /&gt;
My problem is that if the UNC path is not accessible, the GDL script simply stops instead of giving me an error code condition that I can check for.&lt;BR /&gt;
&lt;BR /&gt;
I am aware that this could work if we had mapped drive letters for the folders, but we do not have control over the drive letter assignments.&lt;BR /&gt;
&lt;BR /&gt;
Any thoughts appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Danny&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Mar 2013 23:10:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128020#M14160</guid>
      <dc:creator>Danny Sparks-Cousins</dc:creator>
      <dc:date>2013-03-13T23:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128021#M14161</link>
      <description>I don't know that it is possible to check if a folder exists.&lt;BR /&gt;
But why not use the full folder network path (is that what it's called?) rather than a mapped drive path.&lt;BR /&gt;
&lt;BR /&gt;
ie instead of "W:\Working Files" use the full path of "\\MyServer\Data\Working Files".&lt;BR /&gt;
This full path should be the same regardless of what machine you are on and whether the drive has been mapped or not.&lt;BR /&gt;
&lt;BR /&gt;
Of course I am talking Windows OS here - I guess it is similar for a Mac.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
There is another option with the data out where you can set it to ask the user to browse for the path each time.&lt;BR /&gt;
But that is annoying as it doesn't remember and will ask each time.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 14 Mar 2013 01:45:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128021#M14161</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2013-03-14T01:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128022#M14162</link>
      <description>You habe to separate each node of the path and have to check from root. You can read files and folders and can proof, if the next folder in your path exist. If not, abort further checking, otherwise continue with next level.</description>
      <pubDate>Thu, 14 Mar 2013 07:33:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128022#M14162</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2013-03-14T07:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128023#M14163</link>
      <description>Hi Barry - thanks for the reply. &lt;BR /&gt;
&lt;BR /&gt;
We are using UNC paths (\\server\share\folder), but there is no way to check that the folder exists. When users are on the internal domain, then they have access to the server share, when they are outside on public internet, they do not (this is when we would use the ArchiCAD Data folder instead.&lt;BR /&gt;
&lt;BR /&gt;
F. Beister - I know the File Manager I/O Add On can check for the presence of files / folders, but for the root level scan it will only list mapped drive letters, not UNC paths.&lt;BR /&gt;
&lt;BR /&gt;
It would be great if when opening a file  / folder in the following way that ch1 would return -1 or similar if the file / folder didnt exist. Currently it just stops running the GDL script at that point.&lt;BR /&gt;
&lt;BR /&gt;
ch1 = open ("TEXT", f1, "mode = ro")&lt;BR /&gt;
OR&lt;BR /&gt;
ch1 = open ("FileMan", folderpath, "folders")</description>
      <pubDate>Thu, 14 Mar 2013 08:10:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128023#M14163</guid>
      <dc:creator>Danny Sparks-Cousins</dc:creator>
      <dc:date>2013-03-14T08:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128024#M14164</link>
      <description>When I write data files I usually just send them to the folder the job is saved in.&lt;BR /&gt;
That way the data files stay with the job and aren't stored on individual users hard drives in the Archicad Data folder.&lt;BR /&gt;
&lt;BR /&gt;
Use ... &lt;FONT color="#ff001b"&gt;rrr=REQUEST ("Name_of_plan", "", pname, pfullname, ppath)&lt;/FONT&gt;&lt;BR /&gt;
to get the file name and path.&lt;BR /&gt;
&lt;BR /&gt;
You will need to use a bit of string editing to separate the path from the file name.&lt;BR /&gt;
I just do this ...&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff001b"&gt;rrr=REQUEST ("Name_of_plan", "", pname, pfullname, ppath)&lt;BR /&gt;
!pname="test21345"&lt;BR /&gt;
&lt;BR /&gt;
!print pname&lt;BR /&gt;
!print pfullname&lt;BR /&gt;
!print ppath&lt;BR /&gt;
&lt;BR /&gt;
file_name_start = STRSTR(ppath, pfullname)&lt;BR /&gt;
!print file_name_start&lt;BR /&gt;
&lt;BR /&gt;
fold_path = STRSUB(ppath, 1, file_name_start-1)&lt;BR /&gt;
!print fold_path&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This way it doen't matter if the user has mapped a drive letter or is using the full network path or is working from their own hard drive the files will go to where ever the job is.&lt;BR /&gt;
&lt;BR /&gt;
I guess you could extend it and if you always have a "Data" folder in the job folder you could add that to the folder path. It has been a while since I have checked but if the "Data" folder doesn't exist then the GDL script will not create it.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 14 Mar 2013 08:38:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128024#M14164</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2013-03-14T08:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128025#M14165</link>
      <description>&lt;BLOCKQUOTE&gt;...but for the root level scan it will only list mapped drive letters, not UNC paths.&lt;/BLOCKQUOTE&gt;
This I didn't understood in your post. Sorry.
&lt;BLOCKQUOTE&gt;It would be great if when opening a file / folder in the following way that ch1 would return -1 or similar if the file / folder didnt exist. Currently it just stops running the GDL script at that point. &lt;/BLOCKQUOTE&gt;
Yes, I know, because of this I am doing file allocation every time by a certain macro object, which navigates straight to folder, enshuring, that every folder exists.&lt;BR /&gt;
Of course you have to check if the path is existing every time you try to open.&lt;BR /&gt;
It would be so easy, if GS would add an error message/code as you mention.&lt;BR /&gt;
&lt;BR /&gt;
@Barry&lt;BR /&gt;
Nice idea to use project path! But does not work in TW environment.&lt;BR /&gt;
The data folder has moved from ArchiCAD folder to system user settings folder in AC15 (?).&lt;BR /&gt;
&lt;BR /&gt;
Would it be helpful, if a root path is stored in MVO? There you could adjust hard coded, or "by project path". Needs to be entered for each MVO setting, but would be better than for hundred placed objects. If you like, I could add to &lt;A href="http://www.opengdl.org/Default.aspx?tabid=4750" target="_blank"&gt;openLibraryGlobals&lt;/A&gt;.</description>
      <pubDate>Thu, 14 Mar 2013 09:46:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128025#M14165</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2013-03-14T09:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128026#M14166</link>
      <description>Thanks for the replies and the ideas ... something for me to think over. At the moment we are unable to store the files alongside the project - the company directive is for them to be on the UNC path server, failing that on the ArchiCAD Data folder. &lt;BR /&gt;
&lt;BR /&gt;
We also have local and teamwork files &amp;amp; perform a test in a master_gdl object to identify if it is local pln or teamwork file, and set other file locations on this information.</description>
      <pubDate>Thu, 14 Mar 2013 10:00:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128026#M14166</guid>
      <dc:creator>Danny Sparks-Cousins</dc:creator>
      <dc:date>2013-03-14T10:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128027#M14167</link>
      <description>&lt;BLOCKQUOTE&gt;We also have local and teamwork files &amp;amp; perform a test in a master_gdl object to identify if it is local pln or teamwork file, and set other file locations on this information.&lt;/BLOCKQUOTE&gt;
Sounds interesting. Can you explain, how you do this?</description>
      <pubDate>Thu, 14 Mar 2013 10:13:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128027#M14167</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2013-03-14T10:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: File Manager Add-On &amp; UNC Paths</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128028#M14168</link>
      <description>&lt;PRE&gt;rrr=REQUEST("Name_of_plan", "", prj_name, prj_fullname, prj_path)
strPart="teamwork:"
ppp=STRSTR(prj_path,strPart)

if ppp&amp;gt;0 then teamworkProject
&lt;/PRE&gt;

REQUEST Name_of_plan will return teamwork: as part of the path to project ...</description>
      <pubDate>Thu, 14 Mar 2013 10:17:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/File-Manager-Add-On-amp-UNC-Paths/m-p/128028#M14168</guid>
      <dc:creator>Danny Sparks-Cousins</dc:creator>
      <dc:date>2013-03-14T10:17:47Z</dc:date>
    </item>
  </channel>
</rss>

