Hello Forum,
So I know that the dwl and dwl2 files are created as part of the dwg file locking process. These files get created on the google file stream drive appropriately. However the files don't appear to be read if another user opens the dwg file. For example. We have two user: TestUser1 and TestUser2. TestUser1 opens the dwg file on the Google File Stream Team Share. The process creates the two lock files(dwl and dwl2). If TestUser1 attempts to open the dwg file again on their local computer they get the expected read only prompt. However if TestUser2 attempts to open the dwg file on their computer the two lock files(dwl and dwl2) that were created when TestUser1 opened it are not read. New lock files are created for TestUser2. In Google Drive there are two sets of lock files(dwl and dwl2) one set for TestUser1 and one set for TestUser2. Would love to know if this can be resolved. I think it may be how the test for the existence of the lock files is performed. I think it may attempt to create the lock files and then if it gets a file exist error it reads the contents of the file. I think because Google File Stream allows two users to create files with the same name it doesn't generate the file exist error AutoCAD is expecting. I wonder if its possible for the file check to be performed as an operation separate from the creation of the lock files.
Hi,
>> However the files don't appear to be read if another
>> user opens the dwg file.
Correct, these files contains some information about who has the file opened (and with Map3D a bit more), but they are not designed to do file-locking, that has to be done by the server. And most cloud services do not work that way as they copy the files to a local cache and are locking then the local cached file, but not the file on the server.
- alfred -
Please consider the dwl and dwl2 files as cache files and not lock files, like MS Word creates .tmp files while open.
I am concerned about the absence of a read-only prompt for the other networked user and the secondary file cache because I routinely had students open the same file on our server at college. The first user would be "in charge" and editing the file upon open, but all other 15+ students would get the read-only prompt. I instructed them to perform a save-as top their own media so that they were then "in command" of their own file. I never observed additional dwl and dwl2 files in the server folder during these actions.
I suspect there could be different handling of the Google File Stream model in how shared usage of files is handled. While my circumstance was very controlled within the immediate network but the Google model probably has several other network rules at play.
It is an interesting situation and I hope others may share more insight.
Cheers,
Blaine
Thanks for the response @Alfred.NESWADBA and @beyoungjr!!
I have done a bit more research. Although the locking is ultimately performed by the file system, it is the responsibility of the application to perform the lock. This is a really good article on file locking: https://whyistheinternetbroken.wordpress.com/2015/05/20/techmultiprotocol-nas-locking-and-you/
I suspect that since Autocad is running on windows and written in C it may be using winapi to open files. In the definition of the OpenFile function in winapi you can specify how the file is opened with the following flags: OF_SHARE_COMPAT, OF_SHARE_DENY_NONE, OF_SHARE_DENY_READ, OF_SHARE_DENY_WRITE, and OF_SHARE_EXCLUSIVE
More on the openfile function can be found here: https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-openfile
This would explain why if TestUser1 tries to open the dwg twice on the local system they get the expected read only prompt. If the flag is used the operating system is made aware and any future attempts cause the prompt. There appears to be a disconnect as that information is not transferred to the Google File Stream. A potential fix would be to add logic to AutoCAD to check for the existence of the dwl and dwl2 files as part of its lock procedure. If those files exist then it should present the read only prompt even if access to the dwg file appears to be unrestricted. I wonder if an AutoCAD plugin can be built for that. The other solution potentially would be for Google File Stream to handle the file being open similar to how it handles Microsoft Office documents.
Hi,
>> I suspect that since Autocad is running on windows
>> and written in C
Besides of AutoCAD is also running on Mac it is independent which programming language is used ans which API is used. As long as Cloud Services are working with local cache it will always be an issue.
But you might place that which (with a link to your post) to the Autodesk product feedback site >>>here<<<.
- alfred -
@Alfred.NESWADBA I have posted the link to the post in the product feed back link you provided. I don't have access to the source code of AutoCAD for the mac or windows version. My theory on how it interacts with the operating system is just a theory based on the public information about AutoCAD's code base. I have just examined the windows version of AutoCad and there are a large number of windows api dlls in the AutoCAD installation folder that suggest it uses winapi to interface with windows. It is not uncommon in software design for applications to run parallel development tracks for different operating systems. There may be overlap in some of the code base but the differences in the presentation layer alone may make separate development tracks necessary. Google File Stream does use a local cache but that is not presented to the AutoCAD application. Google File Stream uses some wizardy to present the drive to the operating system and applications as a FAT32 local logical drive. From the application stand point it looks just like a normal local drive. The major issue appears to be how Google File Stream chooses to handle request from the application. The request for the lock is handled on the local system but the information about the request for the lock is not passed to Google File Stream and handled as a method to notify other users of a file in a locked state.
I doubt either Google or Autodesk will set their file open procedures based on the other's need. Autodesk has it's own cloud platform, for example.
When using a cloud-based storage system with AutoCAD products, it should be treated like EDMS systems such as Bentley ProjectWise. Those take a copy of the file, set a flag in the storage system record (not the file itself) so others can see it is in a "checked out" state, and work from the copy (which was alluded to up-thread). The difference is that EDMS systems handle the check out/in procedure for you while using a generic file sharing system requires you to handle that part yourself.
Can't find what you're looking for? Ask the community or share your knowledge.