Data Shortcut Project Templates path

Data Shortcut Project Templates path

rjacksonNTGW2
Enthusiast Enthusiast
872 Views
9 Replies
Message 1 of 10

Data Shortcut Project Templates path

rjacksonNTGW2
Enthusiast
Enthusiast

How do I change the default C:\User....... folder to a different location? SharedScreenshot.jpg

0 Likes
Accepted solutions (1)
873 Views
9 Replies
Replies (9)
Message 2 of 10

Kevin.Spear
Advisor
Advisor

It's a registry thing.

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Changing-default-p...

 

If your goal is to standardize this location for all users, you can either:

  • deploy a registry key to all users
  • include location in your shared ACAD.lsp file

 

Thanks
Kevin

Kevin Spear, PE
0 Likes
Message 3 of 10

rjacksonNTGW2
Enthusiast
Enthusiast

@Kevin.Spear 

 

Thanks for confirming that, I was thinking it was a registry key.

 

So, to deploy the key you would need to do this for each version of C3D on a system?

 

How would you do this in acad.lsp (what would the syntax be) as that would be easier and have less involvement with IT.

0 Likes
Message 4 of 10

Kevin.Spear
Advisor
Advisor
Accepted solution

It might look something like this in your acad.lsp file. I am using this to set the tool palette paths (which are within the profile) so I changed the values below to what you probably need. I am using c3d 2024 as well. You might have to change the version accordingly:

  • C3D 2022 - R24.1\\ACAD-5100:409
  • C3D 2023 - R24.2\\ACAD-6100:409
  • C3D 2024 - R24.3\\ACAD-7100:409
 

 

 

(Setq RegKey "HKEY_LOCAL_MACHINE\\SOFTWARE\\Autodesk\\AutoCAD\\R24.3\\ACAD-7100:409\\AEC\\Directories")
(setq ValName "ProjTemplateDir")
(setq ValData "C:\\C3D_DS-Templates")

(if 
  (/= (vl-registry-read RegKey ValName) ValData)
  (vl-registry-write RegKey ValName ValData)
)

(setq str2 "Project Template Path Set...")
(print str2)

 

 

Thanks
Kevin

Kevin Spear, PE
0 Likes
Message 5 of 10

rjacksonNTGW2
Enthusiast
Enthusiast

I'll have to explore this method. Currently our IT department locks down the registry and there's no way for users to make the edits that would be involved in making this happen. But modifying the ACAD.lsp file to make the change would be a far easier pathway forward.

0 Likes
Message 6 of 10

rjacksonNTGW2
Enthusiast
Enthusiast

@Kevin.Spear 

 

If I cannot edit the registry key using REGEDIT does this mean that I won't be able to edit it with LSP as well. I just created a acad.lsp to run testing on my local machine and it doesn't change the value to the location I've provided.

 

 

The reason I ask is I changed the syntax to match my location and it's not changing to the directory I requested.

0 Likes
Message 7 of 10

Kevin.Spear
Advisor
Advisor

Hey. It probably will only work if you have local admin rights as CAD users. Otherwise, it would have to be done manually (yuck) or through a group policy from IT (little more yucky) or built into the deployment (little less yucky). Sorry if this is your situation. Not much you can do when the local machine is locked down.

 

Thanks
Kevin

Kevin Spear, PE
0 Likes
Message 8 of 10

rjacksonNTGW2
Enthusiast
Enthusiast

So, I did a little more testing, this time on my personal pc where I have full admin rights to the registry and I still could not get the folder to switch, even though it would state that the acad.lsp file loaded successfully. Could there be something missing in the syntax that would report this success yet not be successful 😞

 

It did work going through there regedit method, I just hate getting IT involved in this sort of thing, it's like pulling teeth.

0 Likes
Message 9 of 10

Kevin.Spear
Advisor
Advisor

The only thing I can think of is the conditional IF portion of the code. The idea is IF the path is already correct, no need to write it again causing multiple entries. However, I think in this case you can probably remove the IF statement. So it might look like this:

(if 
  (/= (vl-registry-read RegKey ValName) ValData)
  (vl-registry-write RegKey ValName ValData)
)

BECOMES

(vl-registry-write RegKey ValName ValData)
Thanks
Kevin

Kevin Spear, PE
0 Likes
Message 10 of 10

rjacksonNTGW2
Enthusiast
Enthusiast

Thanks, I'll give that a try.

 

Still no go, I'm going, but it reports sucessful. I'm going to go the IT route, as this is only for one office at the moment. Which would be only 4 users. This could grow at a later date.

0 Likes