AutoCAD 2023 Standard Profile Development: How to set the file paths to be on many users local AppData folder?

AutoCAD 2023 Standard Profile Development: How to set the file paths to be on many users local AppData folder?

mnpatric
Enthusiast Enthusiast
1,322 Views
17 Replies
Message 1 of 18

AutoCAD 2023 Standard Profile Development: How to set the file paths to be on many users local AppData folder?

mnpatric
Enthusiast
Enthusiast

I need to create a standard profile for all users in a department and include it in the deployment.  The file paths for the departmental standard elements should be on the network locations such as follows:

  • Customized Support Files
  • Enterprise Customization Files
  • Printer Support Files
  • Templates
  • Tool Palettes

However, the file paths below shouldn't be on the network and should be on the users local folders.  These paths are required on the Profile and can't be blank.  If they are not specified, AutoCAD sets the default path.  So what kind of paths I should set on the standard profile?

 

mnpatric_0-1682367134376.png

 

0 Likes
1,323 Views
17 Replies
Replies (17)
Message 2 of 18

Sea-Haven
Mentor
Mentor

My automatic save file location is C:/Acadtemp so easy to get to.

 

If you set up one Pc the do options profiles and save your profile with a new name, then export profile, this will save a ARG file, ok now step 2 copy the desktop icon, right click on copy, go to target and look for say /p "<<C3D_Metric>>" this is a civ3d profile, so change it to /P "yourprofilename" then save the Icon clicking on this icon will run the profile with everything set up, one thing though you have to make the directories seperately. Copy the icon say via email to other pc's and same with ARG file, need to look for where ARG's are saved.

 

Ok the other way we had a lisp that set everything made directories, set paths, trusted locations, loaded menu's and set up user prefered toolbars. Last item was a script for each user as they all liked different toolbars.

 

Happy to provide an example. My latest version of an install even unzips files required on a users pc useful for external clients.

0 Likes
Message 3 of 18

mnpatric
Enthusiast
Enthusiast

No, you misunderstood my question.  I know how to export Profile and set it default on the AutoCAD shortcut.  My question is not just about Automatic Save location.  It's just an example.  Is it generate an error when other users import the profile that contains my local file paths?  If so, how can I add the file paths that direct to all users' AppData folder on their computer?

0 Likes
Message 4 of 18

ronjonp
Mentor
Mentor

@mnpatric 

 

(setenv "SaveFilePath" (getenv "TEMP"))

To set many other paths look into: 

(vla-get-files (vla-get-preferences (vlax-get-acad-object)))

 

HERE's some documentation.

 

The equivalent VLA code for the SaveFilePath would be:

(vla-put-autosavepath (vla-get-files (vla-get-preferences (vlax-get-acad-object))) (getenv "TEMP"))

 

0 Likes
Message 5 of 18

mnpatric
Enthusiast
Enthusiast
Please explain your solution in detail. Thank you
0 Likes
Message 6 of 18

ronjonp
Mentor
Mentor

@mnpatric I just updated my post .. should help out a bit more.

 

IMO, importing profiles to other peoples computers has never been a good idea.

0 Likes
Message 7 of 18

mnpatric
Enthusiast
Enthusiast
how can I create the standard profile for many users?
0 Likes
Message 8 of 18

ronjonp
Mentor
Mentor

@mnpatric wrote:
how can I create the standard profile for many users?

Depends on what you're changing if you want to do it programmatically. Otherwise export your profile and make sure that there aren't any local paths like in your original question. Open up the *.ARG file in Notepad and do some sleuthing. It could take a bit though, my profile is 3000 lines long.

 

FWIW, I'd take the programming route.

 

0 Likes
Message 9 of 18

mnpatric
Enthusiast
Enthusiast

Some file paths on the Profile requires local path and can't be blank.  How can I distribute the standard profile that I can include in the deloyment?

0 Likes
Message 10 of 18

ronjonp
Mentor
Mentor

Define "some file paths". Are paths the only thing that are different from the OOTB profile?

0 Likes
Message 11 of 18

Sea-Haven
Mentor
Mentor

Sounds like some directories have not been made, same with files that have not been copied. We pointed to the server so made making a profile so much easier for finding files.

 

Have a look at attached note the year it was written, current version does way more.

 

 

 

 

0 Likes
Message 12 of 18

mnpatric
Enthusiast
Enthusiast
but not all files can't be on the server
0 Likes
Message 13 of 18

mnpatric
Enthusiast
Enthusiast

Just updated my original post to describe my situation.

0 Likes
Message 14 of 18

ronjonp
Mentor
Mentor

@mnpatric Try using %APPDATA% environment variable in the path like so:

%APPDATA%\Autodesk\AutoCAD 2024...

Although I think it defaults to that..

0 Likes
Message 15 of 18

mnpatric
Enthusiast
Enthusiast

When I use %APPDATA%, the error displays as shown below.  If my path is incorrect, please provide me the correct path that I should use.  Thank you

 

mnpatric_2-1682379313988.png

 

0 Likes
Message 16 of 18

ronjonp
Mentor
Mentor

Try that in the ARG file.

0 Likes
Message 17 of 18

mnpatric
Enthusiast
Enthusiast
I tried and got the error
0 Likes
Message 18 of 18

ronjonp
Mentor
Mentor

I'm sorry, I cannot help you anymore. I've given you some reference files and urged you to use code to set these paths but you have only one solution in your mind and I'm still honestly not clear on your goal.

 

Maybe someone else with time can pick it up from here. 👍

0 Likes