Deploy Autocad with Plot Style Path

Deploy Autocad with Plot Style Path

NASHCAD
Explorer Explorer
956 Views
10 Replies
Message 1 of 11

Deploy Autocad with Plot Style Path

NASHCAD
Explorer
Explorer

Hi,

 

I'm having a real problem using the new deployment method for AutoCAD. I'm not getting a lot of help from Autodesk support or my reseller so I though I'd ask here.

 

I'm Sysadmin for a 50 architect practice and my users hotdesk a lot. In the past you could make a deployment image that hardcoded the network path for the companies plot styles. Now the deployment method for this is to make a ARG file. 

 

The problem I am having is that this method produces 2 shortcuts on the users desktop. one opens AutoCAD without applying the ARG profile and the other applies the ARG file. This means I have a 50% chance that my users will launch the correct file when they first use a workstation. My users are instinctively opening the plan jane AutoCAD shortcut and then calling helpdesk asking where the plot styles are? This can be weeks after they set up the workstation.

 

I don't understand why Autodesk changed away from the previous why of doing things, but I must assume I'm not quite understanding how this should be done. Could someone tell me how I can fix the location of my company's plot styles so I can prevent all the extra work this is generating?

0 Likes
Accepted solutions (1)
957 Views
10 Replies
Replies (10)
Message 2 of 11

VincentSheehan
Advisor
Advisor

Some of the settings/file paths are saved in the Registry. Once option, you can create a .REG file that will set the files paths in the AutoCAD profile.

 

We use Civil 3D so the file paths are stored in this Registry location.

HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\R24.3\ACAD-7100:409\Profiles\<<C3D_Imperial>>\General

Vincent Sheehan

Sr. Civil Designer
Poly In 3D Blog

0 Likes
Message 3 of 11

NASHCAD
Explorer
Explorer

Thankyou for this response. I did see an article/post on this and I tried it, it does work but I have had a few issues with it.

  • It doesn't seem to change the paths for users that have already made changes to their 2024 AutoCAD profile. I was therefore wondering if there might be a secondary registry location or config file that gets updated after first use?
  • I was hoping that Autodesk had a more 'joined up' solution to this as they did before, rather than us having to hack the registry?

Don't get me wrong I am most grateful for this input and if there is no other way this is a most perfect solution. 

0 Likes
Message 4 of 11

VincentSheehan
Advisor
Advisor

Did you reboot after updating the Registry?

Vincent Sheehan

Sr. Civil Designer
Poly In 3D Blog

0 Likes
Message 5 of 11

NASHCAD
Explorer
Explorer

he, he, 😂 ... yes I rebooted. 
So I have found that unless you open ACAD 2024, and sign in,  the registry path: "HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\R24.3\ACAD-7100:409\Profiles\<<Unnamed Profile>>\General" does not get created. Therefore you have to deploy the software, then go to the machine and open software. Once AutoCAD has been run once the registry paths are created. You can then run a GPO to alter the registry keys to point to your desired location for Plot Styles, etc. As I want these settings in place before my users use the software I have to log onto their workstations before and open the software. If you create a "PrinterStyleSheetDir" key after you deploy the ACAD 2024 software but before the initial run of it, AutoCAD suffers a fatal error. 

 

As I have to physically go to the machine and prep it for the install I cannot see the point in a deployment image? I may as well do a standard install, machine by machine.

 

Going back to my original question, why have they changed the deployment method from a system that worked, to one that doesn't? I can't seem to get it to work using ARG or or Registry methods. I had a 100% deployment success rate before and didn't have to go back to the machine to finish the job.

0 Likes
Message 6 of 11

Simon_Weel
Advisor
Advisor

A similar question. And another topic about the same thing.

 

Edit: to elaborate on the two links - I've been using acad.lsp to change things like profiles, support paths, printer paths / names, menu's etc. for as long as I remember.

As with everything, it takes some effort and a bit of LISP-knowledge, but there's plenty of websites about LISP and it's all at you finger tips - no need to install programming environments etc. Once you know the basics, you can change anything you want, up to the point you no longer need the profile.arg. 

0 Likes
Message 7 of 11

NASHCAD
Explorer
Explorer

This does sound intriguing but I have never used a lisp file nor understand how to execute them at AutoCAD launch. Could you tell me simply how this is done or point me in the right direction? 

0 Likes
Message 8 of 11

Simon_Weel
Advisor
Advisor

If you start AutoCAD and open a drawing, AutoCAD will search for several files and two of them are acad.lsp and acaddoc.lsp.  If found, AutoCAD will load and execute them. Acad.lsp needs to be executed only once, when launching AutoCAD, and can be used to modify system settings. Acaddoc.lsp is loaded with each drawing and can be used to modify variables for the current drawing.

 

So with these two files, you can basically have AutoCAD do what you want, without user-intervention. There's lots of information about this topic, so I suggest googling around. This article might be a good start?

0 Likes
Message 9 of 11

NASHCAD
Explorer
Explorer

Hi, this has been really helpful, can I ask a question? In the article you sent me the person puts their support location at the top of the list (Please see image below). Is it possible to set this up from within the deployment image, or programmatically? I'm trying to run a deployment and not have to do any setup on each PC afterwards. Essentially, how do you point all of your users to the same Acad.lsp file?

 

Below is an example of the ACAD2024.lsp I wrote, I used ChatGPT to tell me where to insert the lines I needed.

NASHCAD_1-1707912913127.png

NASHCAD_0-1707912753241.png

 

0 Likes
Message 10 of 11

Simon_Weel
Advisor
Advisor
Accepted solution

Not sure if you can modify the deployment to include / modify acad.lsp. I create a deployment for AutoCAD using the Account-deployment tool with as little customisation as possible. Then download the image to a local share. We don't deploy customizations to clients but have them stored on a network share. For example, we use modified menu's and LISP applications stored on that share. There's also a default AutoCAD profile on the same share. 

 

A command script (cmd) is used to install AutoCAD on the clients, and I have that script to copy  a modified 'acad.lsp' to the clients Support folder. When a user runs AutoCAD for the first time, it uses the OOTB support paths and it will find that modified acad.lsp, load and execute it. This acad.lsp sets the support paths to point to the network share and restarts AutoCAD. Then AutoCAD will pick up the corporate acad.lsp on the network share, execute it and it will modify several settings.

 

This is the acad.lsp I copy to the client at install time (text is in Dutch):

 

;;******************************************************************************
;;******************************************************************************
;;**                                                                          **
;;** De lokale versie van Acad.lsp wordt bij het starten van AutoCAD          **
;;** geladen als de paden in het profiel niet goed zijn ingesteld.            **
;;** Deze routine wijzigt de supportpaden en geeft een boodschap.             **
;;**                                                                          **
;;******************************************************************************
;;******************************************************************************

(setvar "cmdecho" 0)
(princ "Lokale versie ACAD.LSP verwerken...")
;;------------------------------------------------------------------------------
;;-- Visual LISP                                                              --
;;------------------------------------------------------------------------------
(vl-load-com)

;;------------------------------------------------------------------------------
;;-- Opties instellen onder tab 'Files'                                       --
;;------------------------------------------------------------------------------
 (setq acadsuppad "L:\\AutoCAD\\"
	   userprofilepad (getvar "RoamableRootPrefix")
	   paden (vla-get-files (vla-get-preferences (vlax-get-acad-object)))
       oldsuppad (vla-get-supportpath paden)
	   )

 (if (not (wcmatch (strcase oldsuppad) "*L:\\AutoCAD\\apps*"))
 (progn
		(vla-put-supportpath paden (strcat "L:\\AutoCAD\\apps;" oldsuppad ))
		(setvar "TrustedPaths" (strcat acadsuppad "apps\\...;" acadsuppad "cot\\...;" acadsuppad "support\\...;" userprofilepad "support\\..."))
		(alert "AutoCAD gebruikt niet de juiste configuratie.\n\nKlik op OK om AutoCAD af te sluiten en start het opnieuw.\nDe configuratie wordt dan aangepast.")
		(command "quit")
 )) ;_ end of if

;;------------------------------------------------------------------------------
;;-- Einde acad.lsp                                                           --
;;------------------------------------------------------------------------------
(princ "\nACAD.LSP lokaal is verwerkt.")
 

 

The network share holding the corporate acad.lsp is "L:\\AutoCAD\\".

In short what this routine does. It gets the current support path (vla-get-supportpath) and assign it to variable oldsuppad. Then it looks if this path contains the corporate path (wcmatch (strcase oldsuppad) "*L:\\AutoCAD\\apps*"). If true, the correct support path is already there and the routine exits. If false, change the support path to add the new location as first in the list (vla-put-supportpath paden (strcat "L:\\AutoCAD\\apps;" oldsuppad ) and display a message to restart AutoCAD.

You also have to change the TrustedPaths, if you happen to use them, otherwise AutoCAD won't load the corporate acad.lsp off of the network share.

 

In your case, the ACAD2024.lsp is the corporate acad.lsp and has to be stored on a network share - S:\Acad\Support I guess.

 

Any modifications needed after deploying AutoCAD that cannot be done from within AutoCAD, like copying the 'local' version of acad.lsp to the clients, can be done using a Windows Domain Startup script. That's a whole other can of worms 🙂

 

As always - there's more ways to skin a cat. If you happen to have SCCM, Intune and / or extensive knowledge about PowerShell, things can probably be done in a more streamlined fashion....

0 Likes
Message 11 of 11

NASHCAD
Explorer
Explorer

Thank you for this, I believe I have found a solution with everyone's help here, I'm most grateful. Incase it helps anyone I have written it below:

 

I have PDQ for my deployments so I made a package with three steps: 

1. Silently deploy an "Out-the-box" AutoCAD2024 deployment image. 

2. Sleep step. I paused the process in case it needed a short time to finish anything up in the background. probably unnecessary.

3. Copied my modified AutoCAD2024.lsp (shown above) form a Network location to "%programfiles%\Autodesk\AutoCAD 2024\Support" - I tried Robocopy initially but I had to take ownership of the folder and play with permissions (absolutely a can of worms 🤣). With PDQ I didn't have to do anything. 

I have run it now on 2 systems and all seems good. 

0 Likes