Data Shortcuts Through OneDrive

Data Shortcuts Through OneDrive

Anonymous
Not applicable
5,785 Views
18 Replies
Message 1 of 19

Data Shortcuts Through OneDrive

Anonymous
Not applicable

Has anyone had luck setting up Data Shortcuts through OneDrive? 

 

I have a project that I setup on a shared Onedrive Folder. I have synced the folder to my local computer and set up a data shortcut folder the various elements like surfaces and pipelines. Problem is that anyone who tries to access the files with any data shortcuts in it get hit with broken references for the data shortcuts. (The normal Xrefs work fine by the way.) On a local server we don't have an issue with this as we are both accessing the same file on a map network drive so it works just fine. But a cloud based folder "maps" differently. C:\Users\abc whereas another users cloud folder would be C:\Users/xyz. I thought data shortcuts were suppose to be relative but I know the xml files for the data shortcuts save a direct path. Anyway to make them truly relative?

 

Does anybody no about a workaround for this? 

5,786 Views
18 Replies
Replies (18)
Message 2 of 19

rl_jackson
Mentor
Mentor

Currently there is no workaround for data shortcuts on OneDrive that I'm aware of. However adesk has an alternative that provides the functionality via BIM360 using the 2020 version. 


Rick Jackson
Survey CAD Technician VI

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 3 of 19

jeff_rivers
Advisor
Advisor

My experience with OneDrive at my organization is that even using it to store/save drawings and their xref dependencies was unuseable.  I could open the parent drawing for editing, but any xrefs within that drawing reported the yellow triangle-exclamation mark as 'not found'.  Editing the parent drawing was difficult, SAVEAS took several minutes, or failed.  I'd get an error message, "could not save the drawing, please close and recover" or some such message.

 

I didn't try any farther than that, based on xrefs not working I figured drefs would be same or worse. 


Jeffrey Rivers
Win 10 Pro 64-bit, Intel i9 3.7GHz, 64 GB
NVIDIA RTX A4000
C3D 2020 V13.2.89.0
0 Likes
Message 4 of 19

jae.kwon
Collaborator
Collaborator

You might be able to run a find and replace contents utility (e.g. fart.exe in sourceforge - great name huh?) to manually change all paths from every other possible usernames to your own in some kind of a batch script. Each person would have to have their own.

 

Never tried anything like that so I don't know.

 

BIM 360 Design handles data shortcuts fine now... it actively replaces all the username instances to your own when the files are cached to your local drive. It's a bit on the pricey side though...

 

 

0 Likes
Message 5 of 19

kevincurrey
Collaborator
Collaborator

I have onedrive and datashortcuts working by mapping the onedrive folder as our in-office shared drive.

I've saved this batch file in the root of our shared folder. This is the folder that will mimick our network drive.

 

subst P: "%cd%"

start P:\

 

Change "P" for whatever your drive letter is, and voila. Civil 3d now sees the same path it's used to in the office.

 

The %cd% argument means that it will map the current directory the batch file is run from, so regardless of an individual user's Onedrive (or dropbox, or whatever your cloud drive of choice), that folder will become the mapped drive.

 

The second line, "start P:\" isn't necessary, all it does is open the folder as the "P:" drive so that a user can see that batch file worked.

0 Likes
Message 6 of 19

lynn_zhang
Alumni
Alumni

Hello @Anonymous ,

Just checking to see if your problem has been solved. Did the replies from above help answer your question? Let us know if you still need help.





Lynn Zhang
Community Manager


0 Likes
Message 7 of 19

Anonymous
Not applicable

Does anyone make this work? I cannot figure out how this work. can anyone help?

0 Likes
Message 8 of 19

Anonymous
Not applicable

can you please take an image of how you set it up?  

0 Likes
Message 9 of 19

izzyloh
Enthusiast
Enthusiast

When signing into OneDrive there is an option for folder selection; this way you can forcibly conform pathings to be the same on every user's machine. You will need to have users sign out and back in to get this prompt:

 

ifizzy142_0-1589393219488.png

 

We've been using this method for a while without any issue (aside from a lack of file locking which is just an inherit problem when working with OneDrive/Sharepoint).

 

Hope this helps!

 

 

Izzad "Izzy" Loh, PE | Active Transportation, Multimodal Corridors, & Municipal Site Design using Civil 3D
Message 10 of 19

jalnealFG
Contributor
Contributor

We do this as well, works like a charm. 

0 Likes
Message 11 of 19

jalnealFG
Contributor
Contributor

Or you can set the P drive to the right path using the %username% variable inside your pathing - and then let it use defaults with the variables replacing the portions of the path that will differ if you are putting this pathing in a batch file.  Subst commands have to be run every time, they aren't persistent when you restart a computer. 

0 Likes
Message 12 of 19

thejac
Advocate
Advocate

Doesn't this cause a problem if multiple people are in the same data shortcut at the same time since OneDrive doesn't do file locking?



Jesse Cook
The Land Group, Inc.
www.thelandgroupinc.com
0 Likes
Message 13 of 19

Cadguru42
Advisor
Advisor

We ended up using Egnyte (https://www.egnyte.com) and it seems to work really well since it uses mapped drive letters. I wouldn't recommend using OneDrive and I thought Autodesk didn't support its use for Civil 3D?

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 14 of 19

Reece464K2
Explorer
Explorer

Is "unlink this PC" the same thing as signing out?

0 Likes
Message 15 of 19

jalnealFG
Contributor
Contributor

A data shortcut is simply a pointer, the only time I would think it would have a problem is if two people tried editing a data shortcut at the same time - the chances of that would have to be really slim - normally no need to edit a data shortcut once you have created it. 

0 Likes
Message 16 of 19

jalnealFG
Contributor
Contributor

We are on Egnyte now - I agree its a much better platform because it locks files that are in use. Onedrive with Civil3d is great if you are coordinating and don't have multiple people accessing the same files, as files do not lock, they end up with conflicts. Egnyte does lock the files. 

0 Likes
Message 17 of 19

jalnealFG
Contributor
Contributor

When you unlink, it will disconnect from the onedrive account. Note that the files already on the PC will remain there, but you can delete them and they will do nothing to your cloud files.  Likewise, the files in onedrive stay in onedrive but would only be accessible by browser unless you link an account to a PC again.  If it was your only onedrive account, then if you open onedrive it will have a set up onedrive prompt. 

Message 18 of 19

Cadguru42
Advisor
Advisor

@jalnealFG wrote:

We are on Egnyte now - I agree its a much better platform because it locks files that are in use. Onedrive with Civil3d is great if you are coordinating and don't have multiple people accessing the same files, as files do not lock, they end up with conflicts. Egnyte does lock the files. 


Not sure how Onedrive would work for C3D since the local cached path contains a username. That causes issues with C3D and is one of the main reasons why even ACC doesn't support pipe and pressure catalogs. 

C3D 2024-2026
Windows 11
32GB RAM
0 Likes
Message 19 of 19

Reece464K2
Explorer
Explorer

That was @jalnealFG and @izzyloh 's points. If you sign out and sign back into one drive, you can set the sync folder to not be under the user. I'm at a very small firm that's on OneDrive. I tested jalealFG and izzyloh's method and it's working great. I just made a folder called C:\OneDrive and pathed OneDrive to sync there and we're going to have our other folks do the same so that we all have identical file paths. I plan to push for Egnyte when we grow enough to warrant it, but that's our solution in the meantime.

There are still important quirks and limitations like they mentioned - files don't lock when users are in them in OneDrive, but for a small team that is in constant communication, that's easily an avoidable problem.

0 Likes