Skip to content

Create and modify profiles in AutoCAD

April 26, 2020

To begin, I hope you and your families are healthy and safe. This post is taken from my article in AUGIWord on profiles. I remember writing the post in a hotel lobby while on vacation and was very happy how it came out. Now let’s talk profiles in AutoCAD.

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. 


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 mymacro.lsp file (use notepad or a text editor and save as a .lsp file), use appload and add to your startup suite and your current profile will be displayed on the status bar as shown in the example below. A great way for CAD Managers to check to see if the company standard profile is located.

Example: MyMacro.lsp

;; Created for AUGIWorld.
;; 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

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. 

Next, we need 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  Navigate to the page to download VBA for AutoCAD. 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.

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 paste 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.

For our examples, the code is shown below:

1.    AUGIWorld

_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”;
AUGIWorld Profile

The image below is an example of how I added three new buttons to my tool palette and then changed the text string (i.e. White Background) 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

Under each button, right-click and select Properties. Enter the VBA string to launch the profile you would like to switch. The example below shows us switching to the AUGIWorld.arg profile.

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

Do you want to learn more about lisp for CAD Managers? Check out this Autodesk University class from  R. K. McSwain: As Many CAD Manager Tips As We Can Fit into a Single Hour 

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) In this class, Paul describes how to use LISP code for the modemacro system variable with and without macros.

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

Stay healthy and safe wherever in the World you may be.

Until next month – Sam

Comments are closed.

%d bloggers like this: