Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

How to connect to a file using GDL

Anonymous
Not applicable
Hi all,

with this, I would repost an old question...

Fabrizio Diodati wrote me an answer some times ago, but now I've another similar problem and so, I'm here:

The attached image explains my network resources:

!-------- The following is a piece of code as in DNC CB3 ------------

!-- for Win --
!h="\\Linus\archi_call\file.txt" !Uncomment this for win
!-------------

!-- for MAC --
!h="Linus:archi_call:file.txt" !Uncomment this for mac
!-------------

ch=OPEN ("TEXT", h, "FULLPATH")
CLOSE (ch)

!------------------------------------END------------------------------------

So, refer to the image: why on Win it works and on mac it doesn't?
Do I make anything wrong into the code?



Thank you very much for the reply.
Regards

(AC8.1, Win2000)

dncServer.jpg
5 REPLIES 5
Anonymous
Not applicable
depending on the Mac server setup, "Linus:archi_call:file.txt" may not exist. I know that for file sharing on my home network, when a computer connects to my mac it requires a connection to a home folder "MacintoshHD:Users:Matthew:" in which case the file would need to reside at "MacintoshHD:Users:Matthew:archi_call:file.txt" thats for a local path. but when you have a server you have mount points in which the remote file system is "mounted" If server "Linus" has the mount point set as Users:<name>, the file would need to reside at "MacintoshHD:Users:<name>:archi_call:file.txt" locally which after the network mount translates to "Linus:archi_call:file.txt"

this situation can change though. say your file exists at "MacintoshHD:resources:ArchiCAD_Libs:archi_call:file.txt" and the server mountpoint was set to "MacintoshHD:resources" then your path for the object would be something like "Linus:ArchiCAD_Libs:archi_call:file.txt"

hope this helps and does not confuse you on it any more.

Edit: Now that i think of it... you could also try unix style file paths. which seems more likely than what i posted above. the mount point looks right from the pic.

- Matthew Peychich
Anonymous
Not applicable
Another fix (sorry for the double post) would be to use the dialog option in the OPEN command which would allow the mac user to manually select the file from a browse box and then remember the path. this feature lets the object go between multiple machines of multiple platforms and still find the file via file path error checking. using the dialog option make archicad check for the file before using it and if it is not found, it asks the user to look for it again.

- Matthew Peychich
Anonymous
Not applicable
Thank you very much, Matthew.

I'll try your method... but, perhaps, I solved my problem.

I hope to have not to ask this answer other times in this group... this will me very likeable...

Thanks again.
PWD
Frank Beister
Moderator
[...] would be to use the dialog option in the OPEN command which would allow the mac user to manually select the file from a browse box and then remember the path.
Maybe you can check out the right path in this way. Ask for the file in the dialog box and PRINT the returned value.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Frank,

another gooooood idea!!!!
The best idea, I think

Thank you very veery much
PWD