The Perfect Profile
What Is a Profile?
In many software programs such as Windows, a profile is saved under each login name, saving characteristics of the user environment and system settings. Depending on the login name used, you may have different setup configurations for your program or system by changing the settings while logged in. This concept is similar for CAD designers and operators using AutoCAD®. You can restore different settings from the Options dialog box in a profile and recall them at any time by switching profiles. The Options dialog box shown in Figure 1 highlights the Profiles Tab where you can save a profile as well as import and export for use on other computers.
Figure 1: Options dialog box
The Options dialog box contains separate tabs where you can choose settings to configure in AutoCAD. The Profiles tab can be found to the far right after the Selection tab. This location tells me, a CAD Manager, that after you go through all the other tabs and get the settings you want, save your profile (and export) to retain those settings. This is a quick way for you to transfer options settings from one computer to another or deploy from a network location.
Figure 2: The Profiles tab
Create a New Profile
To create a new profile, select a profile, which will be highlighted. Then select Add to List… as shown in Figure 2. You will be then prompted for a name and description as shown in Figure 3. Enter your profile name and a good description and your profile will be added to the list. It is important to add a description of your profile—adding descriptions to your custom profiles, styles, and customizations can help others on your team determine what you have done.
Figure 3: Add Profile name and description
After you have created your new profile, you can modify the settings on the other tabs of the Options dialog box and the new settings will be associated with the new profile. Profiles are set up like menus where AutoCAD will store the running settings as you launch the program. You have several options on the profiles tab as well as exporting an (.arg) file, which can give you the ability to launch profiles from other computers or a network location. Remember to export your profile out as the settings will be only saved in the running profile until you export out.
When teaching at Autodesk University 2016 I had separate profiles set up for each class I was teaching. I could switch between them and not have to worry about my settings or finding the files I needed for each class. My main purpose for this was accessing my settings and files, which can be quickly obtained through the Places list that is stored in the profile.
For more information on the Places list, see my post on CADProTips: https://cadprotips.com/2017/06/18/projects-and-places-in-autocad/
Let’s look at the list of options located on the Profiles tab (see Figure 4).
- Set Current: Installs the settings from the current profile.
- Add to List: Creates a new profile with the settings enabled.
- Rename: Enables you to rename a profile and change its description.
- Delete: Deletes and removes the selected profile from the list. (This will not delete the actual .arg file if saved to the network.)
- Export: Saves a current profile to an external location as an .arg file.
- Import: Imports a previously saved profile from a secure location.
- Reset: Resets the values of a selected profile to its default settings.
Figure 4: Profile options
Launching Your Custom Profile on Startup
You can set up one or more shortcut icons on the Windows desktop that will start AutoCAD and begin the drawing process using a specified profile (.arg) file. To start AutoCAD with the profile you want, follow these steps.
- On the Windows desktop, right-click the AutoCAD icon and click Properties as shown in Figure 5.
- In the Properties dialog box, click the Shortcut tab and in the Target text box, at the end, enter /p followed by the name and path of the profile (AUGIWORLD.arg) that you want AutoCAD to use when it starts.
Figure 6 highlights the text string that I used in my target path where I have highlighted the area you need to add to the end of the Target line.
Figure 5: Create a startup switch
Figure 6: Adding to your target path
Note: You must use quotation marks (" ") when the directory path names contain spaces.
When you are finished, click OK to accept the changes and exit to the Windows desktop.
AutoCAD will use the profile that you set in the shortcut icon each time the program is started. If the shortcut icon specifies the same profile as one that is already defined in AutoCAD, the settings in the .arg file will not be imported. Also, AutoCAD will recreate the default desktop shortcut whenever a new user runs the application. Therefore, it is recommended you make your customizations to a copy of the shortcut rather than the default. Make sure to give each shortcut icon a distinctive name.
Display Your Current Profile on the Status Bar
Many AutoCAD users customize their startup options using ACADDOC.lsp, ACAD.lsp, or another LISP routine automatically loaded each time you use AutoCAD. You can also create a separate LISP file to add the code and place into your startup suite.
Create the mylisp.lsp file, use appload and add to your startup suite and your current profile will be displayed on the status bar as shown in Figure 7 each time you use AutoCAD. A great way for CAD Managers to check to see if the company standard profile is located.
;; Created for AUGIWORLD 2017.
;; This macro will display the current profile on the status bar
;; Load this file using the startup suite or placed in the acaddoc.lsp.
(setvar "modemacro"(strcat "PROFILE: $(getvar,cprofile)"))
;; end code
Figure 7: Profile name on status bar
Do you want to learn how to load a file from the startup suite? See this post on the Autodesk Knowledge Network: Loading Lisp with Startup Suite in AutoCAD: https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/2b490b8e-5aea-4efa-8ccd-ebbd4589445a.html
For more information on using lisp in custom deployments check out this Autodesk University class from R. K. McSwain: As Many CAD Manager Tips As We Can Fit into a Single Hour (http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2016/autocad/it21032#chapter=0)
Adding the profile to the modemacro system variable is a technique I have been using for many years. I also encourage you to look up Paul Munford’s Autodesk University class named AutoCAD Tool Palettes Master Class (Planning and Preparation, Not Perspiration) http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2017/autocad/lo-aec02#chapter=0. In this class, Paul describes how to use LISP code for the modemacro system variable with and without macros.
Create a Macro to Change Profiles
I typically use a white background for training and screen shots. When designing I use the black background. I wanted to be able to switch between the two quickly. The color of your screen background (and many other colors) are stored within the current profile in AutoCAD. Back to the Options tab we are going to move to the Profiles tab to look at our profile names.
We will not enter the world of Visual Basic and look at the VBASTMT command. You can type this at the command prompt and you will be prompted to enter a Visual Basic Expression.
Note: You may first receive this message. Microsoft Visual Basic for Applications software (VBA) is no longer installed. For more information, visit http://www.autodesk.com/vba-download. Navigate to the page to download VBA for AutoCAD 2018.
Figure 8: The profile names
A Visual Basic statement is a complete instruction that can contain keywords, operators, variables, constants, and expressions. A statement generally occupies a single line, although you can use a colon (:) to include more than one statement on that line. VBA statements are executed in the context of the current drawing and can be loaded via a macro within a new command or on a tool palette.
Figure 9: VBA message
Figure 10: Enter the expression
The VBA command we are going to use will launch a macro to switch between your profiles. Create a command using the CUI or a new button on your tool palette and past the code into either section. Note: your profiles must exist in your current AutoCAD session; therefore, you may need to import and/or create if they are new.
I have two separate Screencasts to better illustrate this technique—one uses the tool palette as shown below and the other adding a custom button to your setup.
Creating a tool palette macro to change your profile in AutoCAD
Creating a custom button to change your profile in AutoCAD https://knowledge.autodesk.com/support/autocad/learn-explore/caas/screencast/Main/Details/fe06aa11-7fbe-44cf-a9c0-e19f9d6628ca.html
For our examples, the code is shown below:
_VBASTMT ThisDrawing.Application.Preferences.Profiles.ActiveProfile = "AUGIWORLD";
2. White Background
_VBASTMT ThisDrawing.Application.Preferences.Profiles.ActiveProfile = "White_Background";
3. Black Background
_VBASTMT ThisDrawing.Application.Preferences.Profiles.ActiveProfile = "Black_Background";
Figure 11 is an example of how I added three new buttons to my tool palette and then changed the text string (Figure 12) to add to a custom palette to switch the macros. The images were simply created using the button editor, then saving out to a .bmp
Figure 11: Tool palette buttons
Under each button, right-click and select Properties. Enter the VBA string to launch the profile you would like to switch. The example in Figure 11 shows us switching to the AUGIWORLD.arg profile.
Figure 12: Set the AUGIWORLD profile
We all have options, so why not choose the best ones to suit your needs? A profile in AutoCAD can give you access to all your customized options in one place. Customizing profiles aligned with your current workflow and standards can prove to save time and increase productivity. Create several profiles, then export out to different names saving to a secure location. Profiles can help you retain and adjust settings to ensure that you stay competitive and up to date with the current standards and system variable changes that occur with your AutoCAD platform.