[MS CE 15.2] References files path to OneDrive folder

Hi,

In our company, we are now using onedrive to store our CAD projects

We are facing a problem with the path for the reference files

If I attach a reference path it uses my Windows user directory :

C:\user\[MYWindowsLogin]\OneDrive-Of-My-Company\Project Folders\Shared Project\ReferenceFile.dgn

So, when a collegue opens the file, obviously the reference file  is not found because his windows login is different.

Using relative paths does not help. Not sure that MS_RFDIR can help either because we have a lot of project directories

Any ideas ?

Many thanks

Parents Reply Children
  • I believe %OneDrive% is the generic and %OneDriveCommercial% only exists if you're using OneDrive for business. The article you link to mentions %OneDriveConsumer% is the regular user OneDrive version. I have commercial version installed and have both %OneDrive% and %OneDriveCommercial% (pointing to the same path). I assume all products create the %OneDrive%

    if you want a more fail safe way:

    %undef ustnOneDrive
    %if !defined (ustnOneDrive) && defined (OneDrive) && ($(OneDrive) != "") && exists ($(OneDrive))
    	ustnOneDrive=$(OneDrive)/
    %endif
    %if !defined (ustnOneDrive) && defined (OneDriveCommercial) && ($(OneDriveCommercial) != "") && exists ($(OneDriveCommercial))
    	ustnOneDrive=$(OneDriveCommercial)/
    %endif
    %if !defined (ustnOneDrive) && defined (OneDriveConsumer) && ($(OneDriveConsumer) != "") && exists ($(OneDriveConsumer))
    	ustnOneDrive=$(OneDriveConsumer)/
    %endif
    
    %if !defined (ustnOneDrive)
        %error Unable to locate Microsoft OneDrive environment variable
    %endif
    
    MS_RFDIR = $(ustnOneDrive)Project Folders/Shared Project/
    MS_RFDIR > $(ustnOneDrive)Project Folders/Shared Project/other_ref_dir/

    I couldn't find any documentation at Microsoft as to which environment variables are created when.