Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HELP: Onedrive and Tool Palatte pathing and loading for users

4 REPLIES 4
Reply
Message 1 of 5
Dylan_Corkill
296 Views, 4 Replies

HELP: Onedrive and Tool Palatte pathing and loading for users

So we are working on complete overhaul of our cadd system here and we have moved all of our user specific content into our users corporate Onedrive accounts.   This is great as it keeps things backup and they can access it easily from any machine they are using Autocad on.   The issue I've run into is how do we path that within the CUI file so that when we switch tool palettes it will load from the onedrive.  We have tried using dedicated paths but because we require the path to be c:\users\username\onedrive it fails because it either reads the username literally and won't accept %username%.

 

The solution we found was using some code in the mnl to develop a UserToolPalettePath variable that uses the username and then push it through in the cui with this macro   ^C^C(command "*_toolpalettepath" UserToolPalettePath);TOOLPALETTES;

 

This works but I'm curious if there is a better way.

 

Thanks

 

Dylan

 

 

 

***THE POST TITLE HAS BEEN EDITED FOR CLARITY***

Tags (1)
4 REPLIES 4
Message 2 of 5
dmfrazier
in reply to: Dylan_Corkill
Message 3 of 5

Would you mind elaborating on this solution? I'm in the process of performing a similar task in my organization and mapping tool palettes (as well as templates) with %username% but obviously ACAD doesn't accept it. My experience with mnl files is limited at best, but this seems to be the best solution I have stumbled across yet

Message 4 of 5
Message 5 of 5

Hi Daniel,

 

So the coding we used in the cui file ^C^C(command "*_toolpalettepath" UserToolPalettePath);TOOLPALETTES;

 

The mnl coding was a little trickier to figure out but what we ended up with was 

(setq username (getenv "username")
UserFolderPath (strcase (strcat "C:/Users/" username "/OneDrive/Autodesk/ACAD Custom 2022/"))
UserToolPalettePath (strcase (strcat "C:\\Users\\" username "\\OneDrive\\Autodesk\\ACAD Custom 2022\\Tool Palettes\\"))
)

 

So in this case the mnl file grabs your username from the computer you are on and then we built our folder paths around it.  Once we had that we were able to use that and turn it into the variable of UserToolPalettePath and put that in the macro coding in the CUI.

Hope that helps.

 

Dylan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta