[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
  • OneDrive creates Windows Environment variables that point to the OneDrive folder of the current user. You can use environment variables as regular variables in MicroStation.

    So setting MS_RFDIR to:

    MS_RFDIR = $(OneDrive)/Project Folders/Shared Project/
    
    add additional paths with the > operator:
    MS_RFDIR > $(OneDrive)/Project Folders/Shared Project/other_ref_dir/
    
    Note: slashes should be forward slashes in configuration files.

     

  • OneDrive creates Windows Environment variables that point to the OneDrive folder of the current user

    Apparently we can use other environment variables with OneDrive.

    Quoting from that article: The answer is to use %OneDriveCommercial% as the generic prefix to share paths among people using the same corporate OneDrive.

     
    Regards, Jon Summers
    LA Solutions

  • 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.

     

Reply
  • 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.

     

Children
No Data