AutoCAD has a security feature to ensure that only code from Trusted Locations is loaded into your AutoCAD environment. "Code" includes LSP, DLL, MNL, FAS, ARX, DBX, JavaScript, and others.
There are a few System Variables to be aware of that might make it helpful to manage the Trusted Locations in your Environment.
First, the SECURELOAD System Variable. If this is set to 1 (Default setting), AutoCAD will load code based files only if their location is in the trusted locations specified in the TRUSTEDPATHS System Variable. If code based files are not in a trusted location, AutoCAD will display a warning.
If SECURELOAD is set to 0, AutoCAD will load code based files without warning (this is similar to previous versions of AutoCAD but is not recommended as it can put your environment at risk).
Second, the TRUSTEDPATHS System Variable. If SECURELOAD is enabled (i.e. set to 1) then trusted locations need to be specified in order to not have AutoCAD display a warning dialog every time a drawing is opened.
In this example I am trying to load an MNL file that is located in C:\SLD. The MNL file is calling LSP files that are in various support paths within the SLD folder.
This means that I receive a warning message for each file so I need to click Load 4 times to get to my drawing with my code loaded.
This can be resolved by specifying all of the folders as Trusted Locations in the TRUSTEDPATHS system variable.
Now when I open a drawing in this profile, the MNL and all of the supporting LSP files are loaded. This is nice but it is cumbersome to manage multiple support locations. For example, if a fourth Support folder is added to the environment I have to remember to add this as a Trusted Location.
Fortunately, there is a streamlined solution to this. If I want the SLD folder and all sub-folders to be trusted I can simply add \... (backslash and 3 dots) and just have 1 Trusted Location defined. So it would look like this:
Now all code based files within the C:\SLD structure will be loaded. This allows you to apply a level of security to your environment but not be overwhelmed by having to keep track of every location where a code based file exists.
Showing posts with label AutoCAD Profiles. Show all posts
Showing posts with label AutoCAD Profiles. Show all posts
Thursday, January 15, 2015
Wednesday, August 21, 2013
Quick way to restore AutoCAD Profile Settings
It's not easy to remember where some of the default AutoCAD support content is located. For example, if you want to test a ctb file real quick you might change the Plot Style Table Search Path in your current profile. If this happens to be your Unnamed Profile (out of the box AutoCAD profile) you probably want to change this back to the default path when you are done testing. The default path for the Plot Style Table Search Path is:
C:\Users\username\appdata\roaming\autodesk\autocad 2013 - English\r19.0\enu\plotters\plot styles which is also %RoamableRootFolder%\support.
Instead of memorizing this path, a quick and easy way to restore the default is to delete the temporary path. This will set the path back to the default location.
For example, if I change my Plot Style Table Search Path to a custom location:
C:\Users\username\appdata\roaming\autodesk\autocad 2013 - English\r19.0\enu\plotters\plot styles which is also %RoamableRootFolder%\support.
Instead of memorizing this path, a quick and easy way to restore the default is to delete the temporary path. This will set the path back to the default location.
For example, if I change my Plot Style Table Search Path to a custom location:
Then, when I am ready to change it back: highlight the path, click Remove (the path becomes blank), then click Ok.
A dialog saying: "...a path was not specified. The default location will be used..." will display. Click Ok and the path is restored to the default.
This can come in handy for a quick test situation or when helping another CAD operator restore a profile path that was inadvertently changed.
Thursday, June 28, 2012
Simple Custom AutoCAD User Profile
In previous posts I have talked about creating AutoCAD user profiles and the different components that can be included in a profile. One of the main reasons to create an AutoCAD user profile is to have specific content available during an AutoCAD drawing session. This content can be anything from network and printer paths, to CAD standards, to custom commands.
This post will go through creating a very simple custom AutoCAD profile and hopefully it will make sense on how to add more information to the profile as needed in your environment.
An AutoCAD user profile has a lot of information in it and without being intimately familiar with it, it is difficult to know what each line in the profile (.arg) file is doing. The good news is it is really not that important if you just want to cut to the chase and create your own custom profile. We will let AutoCAD handle all the complicated stuff and we will focus on only the items we are concerned with (the simple stuff).
First, just a few high level points to make:
An .arg (AutoCAD Registry) file is used to create an AutoCAD user profile and set registry keys on your computer. If you have ever looked (you don't really need to) in your computer's registry you will see all of the AutoCAD user profiles that are defined on your computer. (Note: AutoCAD user profiles are specific to the logged in user).
This post will go through creating a very simple custom AutoCAD profile and hopefully it will make sense on how to add more information to the profile as needed in your environment.
An AutoCAD user profile has a lot of information in it and without being intimately familiar with it, it is difficult to know what each line in the profile (.arg) file is doing. The good news is it is really not that important if you just want to cut to the chase and create your own custom profile. We will let AutoCAD handle all the complicated stuff and we will focus on only the items we are concerned with (the simple stuff).
First, just a few high level points to make:
An .arg (AutoCAD Registry) file is used to create an AutoCAD user profile and set registry keys on your computer. If you have ever looked (you don't really need to) in your computer's registry you will see all of the AutoCAD user profiles that are defined on your computer. (Note: AutoCAD user profiles are specific to the logged in user).
After installing AutoCAD you should see the Unnamed Profile which is the out-of-the-box delivered AutoCAD user profile.
Let's create a new .arg file with the goal being to create a new AutoCAD user profile on our computer. To keep this simple we only need to think about the custom paths or content we want to add to our profile. In this case we are just going to add an AutoCAD Support Path and point to a custom cui file that we would like to have loaded as our Enterprise Menu File.
Rather than needing to account for all of the other settings in the profile we will let AutoCAD automatically assign everything else. So basically, only the registry keys that we want to override need to be identified in our new .arg file.
To accomplish the above we can create a new .arg file (either by exporting from AutoCAD, or from scratch). Once the .arg file exists we can clean out everything we do not need (so everything except for our support path and Enterprise Menu File). Whatever we do not define in our .arg file AutoCAD will create default registry keys for.
Here is the contents of our custom .arg file that adds a support path and an Enterprise Menu File: (You can edit an .arg file with Notepad)
REGEDIT4
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9001:409\Profiles\SLD_Example\General]
"ACAD"="C:\\SLD\\Support;%InstallFolder%\\support;%InstallFolder%\\fonts;%InstallFolder%\\help;%InstallFolder%\\express;%InstallFolder%\\support\\color;%RoamableRootFolder%\\support;"
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9001:409\Profiles\SLD_Example\General Configuration]
"EnterpriseMenuFile"="C:\SLD\Support\SLD_2011"
The path in between the brackets [ ] defines the location of the registry keys that we are modifying. Notice it is the same path as the registry location of the Unnamed Profile on our machine (above image) except for once we get to the Profiles location we are creating a new profile name, SLD_Example.
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9001:409\Profiles\SLD_Example\General]
We are overriding the "ACAD" registry key which is the AutoCAD Support Paths. The below support paths are copied from the Unnamed Profile and we added the 1 support path that we need for our custom profile.
"ACAD"="C:\\SLD\\Support;%InstallFolder%\\support;%InstallFolder%\\fonts;%InstallFolder%\\help;%InstallFolder%\\express;%InstallFolder%\\support\\color;%RoamableRootFolder%\\support;"
We then define the "EnterpriseMenuFile" registry key which is our custom cui file that we want our profile to have. (The cui file could be located in a network location so multiple users all receive the same custom content.)
"EnterpriseMenuFile"="C:\SLD\Support\SLD_2011"
Now when we point to this .arg file from our AutoCAD Desktop Shortcut and launch AutoCAD a new profile will be created on your computer:
Even though we only defined 2 registry keys you will notice that all of the other profile information is automatically defined by AutoCAD.
You now have a completely separate and custom AutoCAD user profile that contains all of the out-of-the-box AutoCAD settings with our additional custom content. This can be shared over a network and remember, once we load that Enterprise cui file we can gain access to custom content with an .mnl file that has the same name as the cui file.
I created a new Ribbon tab in this cui file so you can see that is available to us in our new profile:
This approach can offer a very streamlined method to manage multiple AutoCAD user profiles that maybe you have for each client. Only define the registry keys that you want to override (i.e. suport paths, cui file, maybe plot styles, etc.) and you can keep your profiles very simple and portable by letting AutoCAD do the rest of the work. This .arg file that we created can easily be upgraded to the next version of AutoCAD since we know AutoCAD will automatically define all of the other registry keys that we are not overriding. (Note, the registry path to the profile would be different for each version of AutoCAD - this it the path in the brackets [ ] mentioned above).
Note, you can build your profile in AutoCAD and export it out to get the .arg file. You can then remove any of the registry keys that you are not overriding and you will be left with your simple custom AutoCAD user profile.
Saturday, November 26, 2011
Updating a Network User Profile
Maintaining network based AutoCAD user profiles is a simple, organized way of delivering any content you need your users to have. Once the main architecture is in place you can make updates to a profile and all users will instantly get the update...or will they?
If we have an AutoCAD profile on a network location that everyone is pointing to (maybe from an AutoCAD desktop shortcut) the first time the profile is loaded it will define the profile name on the computer's registry under the AutoCAD Profiles path. This then ensures that all users have the same settings that are defined in the profile.
The way this behaves after the profile has been loaded in the registry is when the icon is launched again AutoCAD checks to see if the profile being pointed to in the desktop shortcut is already defined on that computer. If so, AutoCAD does not re-define the profile it just makes sure to set that profile current. The downside to this is if you make a change to the profile (for example add a support path) this does not automatically get deployed to machines that already have the profile defined.
The way this behaves after the profile has been loaded in the registry is when the icon is launched again AutoCAD checks to see if the profile being pointed to in the desktop shortcut is already defined on that computer. If so, AutoCAD does not re-define the profile it just makes sure to set that profile current. The downside to this is if you make a change to the profile (for example add a support path) this does not automatically get deployed to machines that already have the profile defined.
There are two ways to make sure everyone gets the update:
1. Delete the profile from the users' local machines then when the desktop icon that points to the network profile is launched, the profile is re-defined with the most recent updates.
1. Delete the profile from the users' local machines then when the desktop icon that points to the network profile is launched, the profile is re-defined with the most recent updates.
2. Change the actual profile name. This will then tell AutoCAD that this is a new profile that is not defined on any one's machine yet. This method works without having to update the custom AutoCAD desktop icon because changing the profile name happens within the .arg file - the filename of the .arg file is irrelevant.
Let's walk through this from the beginning to make sense of this:
I have created a network based AutoCAD user profile that I want to load for all users. My new profile only has an additional support path and an enterprise menu file definition.
My choice of deployment was to create a new AutoCAD desktop icon that points to the custom profile (.arg file). Note: this location typically would reside on a shared network drive.
Once this icon is on each desktop (maybe automated via SharePoint) we are set to manage our custom network environment.
Note, at this point I have copied the desktop icon to my desktop but the AutoCAD profile <<SLD_2011>> does not exist on my machine yet.
When I launch the icon for the first time the AutoCAD Profile is defined in my local computer registry
Here is how the Options dialog looks in AutoCAD with the custom profile now loaded on my computer.
So now, we are to the real topic of this post where we want to make a modification to our shared network user profile. Let's say we want to add an additional support path (Support2).
This is great for anyone that has not yet loaded this profile but what about for machines that already have the profile defined? When these users launch AutoCAD into the custom profile their profile on the local machine does not get re-defined so therefore they do not get the additional support path. The key here is the profile name. AutoCAD checks if the profile is already defined within the registry and if so the profile is not updated. But if we change the actual profile name after making the change then AutoCAD will recognize this as a brand new profile and we can be assured that the change will be deployed to all users because they will actually be creating a new AutoCAD user profile.
To do this we do not need to change the filename of our .arg which also prevents the need for changing or modifying the desktop icon that is already on user's desktops. The change is made only within the .arg file itself.
Now, even though I have the original profile already defined on my computer when I launch the custom AutoCAD shortcut again the new profile is created (and made current) and I now have the additional support path that was added.
You might notice I updated my profile name with a new version. This might be a strategy you want to adopt from the beginning. If so, you can include a version indicator in your original network profile.
This provides a streamlined method of managing and updating a network based AutoCAD profile. The power of this method is everything is controlled from a single network location and the local workstations do not need to be touched in order to deploy updates to AutoCAD user profiles.
Let's walk through this from the beginning to make sense of this:
I have created a network based AutoCAD user profile that I want to load for all users. My new profile only has an additional support path and an enterprise menu file definition.
My choice of deployment was to create a new AutoCAD desktop icon that points to the custom profile (.arg file). Note: this location typically would reside on a shared network drive.
Once this icon is on each desktop (maybe automated via SharePoint) we are set to manage our custom network environment.
Note, at this point I have copied the desktop icon to my desktop but the AutoCAD profile <<SLD_2011>> does not exist on my machine yet.
When I launch the icon for the first time the AutoCAD Profile is defined in my local computer registry
Here is how the Options dialog looks in AutoCAD with the custom profile now loaded on my computer.
So now, we are to the real topic of this post where we want to make a modification to our shared network user profile. Let's say we want to add an additional support path (Support2).
This is great for anyone that has not yet loaded this profile but what about for machines that already have the profile defined? When these users launch AutoCAD into the custom profile their profile on the local machine does not get re-defined so therefore they do not get the additional support path. The key here is the profile name. AutoCAD checks if the profile is already defined within the registry and if so the profile is not updated. But if we change the actual profile name after making the change then AutoCAD will recognize this as a brand new profile and we can be assured that the change will be deployed to all users because they will actually be creating a new AutoCAD user profile.
To do this we do not need to change the filename of our .arg which also prevents the need for changing or modifying the desktop icon that is already on user's desktops. The change is made only within the .arg file itself.
Now, even though I have the original profile already defined on my computer when I launch the custom AutoCAD shortcut again the new profile is created (and made current) and I now have the additional support path that was added.
You might notice I updated my profile name with a new version. This might be a strategy you want to adopt from the beginning. If so, you can include a version indicator in your original network profile.
This provides a streamlined method of managing and updating a network based AutoCAD profile. The power of this method is everything is controlled from a single network location and the local workstations do not need to be touched in order to deploy updates to AutoCAD user profiles.
Tuesday, August 10, 2010
Creating an AutoCAD User Profile
Creating an AutoCAD user profile allows AutoCAD to be "customized" in order to function efficiently within an environment. A few examples of data that is stored in an AutoCAD profile are support paths and plotter paths such as the location of .ctb files. Additionally, some of the most important elements in an AutoCAD user profile are the Customization (CUI) Files.
There are two primary CUI files, Main and Enterprise. The difference between these are that Main is editable by the user while the Enterprise CUI file is read-only by default. This makes the Enterprise CUI a great choice for providing customized content to your users through a shared network CUI file.
To create an AutoCAD user profile that points to your network CUI file we will start in AutoCAD. Select Tools | Options | Profile Tab | Add to List and enter a new profile name.
Click Apply & Close and then select the new profile and click Set Current. Your new profile should be highlighted and should show up as the current profile.
Select the Files Tab and point the Enterprise Customization File to the network cui file that you will be using. (Note: You can use UNC instead of a drive letter if you do not have a common network drive map for all users).
There are several other paths, settings, and configurations that can be controlled by the AutoCAD user profile but we will only change our Enterprise CUI for now.
Let's now export this profile so we can place it on a network file server making it available to all users. To do this go back to the Profiles tab and click Export. This creates a single file with an .arg extension. Once this .arg file is on the network we need a way to load it into AutoCAD. For this we can create an AutoCAD desktop icon that will load the new profile.
Copy an AutoCAD desktop shortcut into a network location (we can share this new shortcut with all users).
Right click on the AutoCAD shortcut and select Properties. We can now point to the .arg file using the /p (profile) parameter on the Target line.
Note: the /p goes after the acad.exe parameter that is already in the Target line. The full target line now looks like this:
"C:\Program Files\AutoCAD 2010\acad.exe" /p "X:\SLD\Profiles\SLD.arg"
This AutoCAD shortcut can be re-named and copied to each users' desktop and double clicking it will load the new profile you created!
The beauty of this approach is you do not need to modify anything on the users' machines, just simply copy the shortcut. You can automate the process of copying the shortcut to their desktops several different ways. The method I use is a batch (.bat) file that can be executed through a hyperlink on a web based collaboration tool such as SharePoint. This allows any user to get any profile (desktop shortcut) on to their machine with a single click.
You can make as many .arg files as you need depending on unique client needs, vertical application needs, or discipline needs.
With the core structure of our AutoCAD environment in place we have set the stage for endless customization possibilities. Next we will talk about loading an .mnl (menu lisp) file along with the CUI file and how this can be the key to providing all sorts of customized apps to your users.
There are two primary CUI files, Main and Enterprise. The difference between these are that Main is editable by the user while the Enterprise CUI file is read-only by default. This makes the Enterprise CUI a great choice for providing customized content to your users through a shared network CUI file.
To create an AutoCAD user profile that points to your network CUI file we will start in AutoCAD. Select Tools | Options | Profile Tab | Add to List and enter a new profile name.
Click Apply & Close and then select the new profile and click Set Current. Your new profile should be highlighted and should show up as the current profile.
Select the Files Tab and point the Enterprise Customization File to the network cui file that you will be using. (Note: You can use UNC instead of a drive letter if you do not have a common network drive map for all users).
There are several other paths, settings, and configurations that can be controlled by the AutoCAD user profile but we will only change our Enterprise CUI for now.
Let's now export this profile so we can place it on a network file server making it available to all users. To do this go back to the Profiles tab and click Export. This creates a single file with an .arg extension. Once this .arg file is on the network we need a way to load it into AutoCAD. For this we can create an AutoCAD desktop icon that will load the new profile.
Copy an AutoCAD desktop shortcut into a network location (we can share this new shortcut with all users).
Right click on the AutoCAD shortcut and select Properties. We can now point to the .arg file using the /p (profile) parameter on the Target line.
Note: the /p goes after the acad.exe parameter that is already in the Target line. The full target line now looks like this:
"C:\Program Files\AutoCAD 2010\acad.exe" /p "X:\SLD\Profiles\SLD.arg"
This AutoCAD shortcut can be re-named and copied to each users' desktop and double clicking it will load the new profile you created!
The beauty of this approach is you do not need to modify anything on the users' machines, just simply copy the shortcut. You can automate the process of copying the shortcut to their desktops several different ways. The method I use is a batch (.bat) file that can be executed through a hyperlink on a web based collaboration tool such as SharePoint. This allows any user to get any profile (desktop shortcut) on to their machine with a single click.
You can make as many .arg files as you need depending on unique client needs, vertical application needs, or discipline needs.
With the core structure of our AutoCAD environment in place we have set the stage for endless customization possibilities. Next we will talk about loading an .mnl (menu lisp) file along with the CUI file and how this can be the key to providing all sorts of customized apps to your users.
Subscribe to:
Posts (Atom)