CAD Dictionary

What is an AutoCAD CFG file?

An AutoCAD CFG (configuration) file is a plain text configuration file that lets you customize and configure AutoCAD to match your workflow. CFG files control startup settings, workspace layouts, menu loading, plotting defaults and other preferences. Proper use of CFG files can save time, ensure consistency across projects, and make it easy to deploy a standard environment to multiple users.

What is an AutoCAD CFG file?

An AutoCAD CFG file is a simple text-based configuration file that contains commands and parameters AutoCAD reads when it starts (or when you explicitly load the file). These files are used to:

  • Set up workspace layouts, toolbars, and menus.
  • Define plot/print defaults (plotter, paper size, plot style tables).
  • Link custom menu files (MNU) and other resources.
  • Automate repetitive configuration tasks.

CFG files are easy to edit with any text editor (Notepad, Notepad++, VS Code) because they are human-readable.

How are AutoCAD CFG files created and edited?

Quick explanation

CFG files are typically created or edited as plain text and saved with a .cfg extension (or whatever extension your environment expects). In AutoCAD deployments, the CFG file may be included in a startup script or referenced by a launcher.

Read Also:  What is an AutoCAD DWF file?

Step-by-step: Create or edit a CFG file

  1. Open a text editor such as Notepad or Notepad++.
  2. Create a new file and save it as MySettings.cfg (choose a meaningful name).
  3. Add configuration lines. Common lines include:
    • MENU loading: MENULOAD “
    • Workspace: WORKSPACE “
    • Plot defaults: PLOTTER “PrinterName”, PAPER_SIZE “A3”, CTB_FILE “monochrome.ctb”
  4. Use full file paths or relative paths that AutoCAD can resolve.
  5. Save the file in a location where AutoCAD can access it (for single-user: your profile folder; for multiple users: a shared network folder).
  6. Test by launching AutoCAD or manually executing the commands inside AutoCAD’s command line (paste lines or use a script).

Example snippet:

MENULOAD “C:\CAD\CustomMenus\mycustom.mnu”
WORKSPACE “CAD_Production”
PLOTTER “Default_Plotter”
PAPER_SIZE “A3”
CTB_FILE “monochrome.ctb”

Notes on editing safely

  • Always back up existing CFG files before changing them.
  • Keep files in ASCII or UTF-8 without BOM if your editor gives encoding options (AutoCAD prefers simple encodings).
  • Use descriptive comments where supported (see Tips section for comment syntax suggestions).

Common uses and practical examples

workspace customization

CFG files can define which toolbars, palettes, and menus are loaded at startup. Common actions:

  • Prioritize frequently used tools by setting up a named workspace.
  • Use the WORKSPACE command in the CFG to apply a workspace automatically.
  • Save multiple workspace configurations for different project types (e.g., drafting vs. civil).

Example:

WORKSPACE “Architect_Template”

Loading custom menus (MNU)

CFG files make it easy to load custom MNU files so specialized menus are available immediately:

  • Create or edit a MNU file with your menu structure.
  • Reference it in the CFG using MENULOAD or similar syntax.

Example:

MENULOAD “C:\CAD\Menus\office.mnu”

Plot styles and print configuration

CFG is useful to ensure consistent printing:

  • Define plot style tables (CTB/STB) and set default paper sizes.
  • Automate common plot settings across many users.

Example:

PLOTTER “HP_LaserJet_CC”
PAPER_SIZE “A1”
CTB_FILE “project_standard.ctb”

Alternative methods to configure AutoCAD

If you prefer not to edit CFG files directly, consider these alternatives:

  • Use the AutoCAD Options dialog (GUI) to set many preferences interactively.
  • Use the CUI (Customize user interface) editor to manage menus, toolbars, and workspaces.
  • Create startup scripts (.scr) containing AutoCAD commands and run them at startup.
  • Use AutoLISP or script automation (ScriptPro) to load configurations and custom routines automatically.
  • For enterprise deployment, use AutoCAD Deployment tools to package CFG settings and other files for multiple machines.

Errors, common issues and fixes

  • Problem: AutoCAD ignores the CFG file.

    • Fixes:
      • Verify the file path is correct and AutoCAD can access it (check network permissions).
      • Ensure the file uses a supported encoding (ASCII/UTF-8 without BOM).
      • Confirm the syntax/commands used are valid for your AutoCAD version.
      • If AutoCAD starts with a custom launcher, confirm the launcher references the right CFG.
  • Problem: MENULOAD or other commands fail.

    • Fixes:
      • Ensure the referenced MNU/MENULOAD path is correct and the file exists.
      • Run the commands manually in AutoCAD to see error messages.
      • Check for file permission or read-only issues.
  • Problem: Plot output differs from expected (wrong lineweights, colors).

    • Fixes:
      • Confirm the CTB or STB file path in the CFG is correct.
      • Verify the CTB/STB file contents and that it’s accessible by AutoCAD.
      • Test plotting from AutoCAD’s Plot dialog to isolate whether the issue is CFG-related or Plot configuration-related.
  • Problem: Workspace changes not applied.

    • Fixes:
      • Use the WORKSPACE command manually to check workspace name spellings.
      • Make sure custom workspaces are saved properly and included in the support path.

Best practices and tips

  • Back up CFG files before making changes.
  • Put CFG and related resources (MNU, CTB) in a central, versioned location for teams.
  • Use clear, descriptive comments in your CFG file where the format supports comments (for example, prefix comment lines with a semicolon ; or a recognized comment token) so teammates understand why changes were made.
  • Test changes in a non-critical environment (a test workstation) before rolling them out.
  • Keep a short change log at the top of the CFG (date and brief note) to track edits and authors.
  • Use relative paths where possible for portability, or host shared files on a stable network share.
  • Combine CFGs with scripts or AutoLISP for advanced automation (e.g., automatic layer setups, template loading).

FAQ

Where do I find my AutoCAD CFG file?

CFG files are not always created by default. Look in these places:

  • Your AutoCAD program folder and support paths (check AutoCAD’s Options > Files > Support File Search Path).
  • A shared network folder if your organization deploys a standard CFG.
  • Create a new CFG in a known folder and ensure AutoCAD is pointed to it.

Can I use a CFG file to deploy settings to multiple users?

Yes. Place the CFG and referenced resource files (MNU, CTB/STB, templates) on a shared network location and point each user’s AutoCAD support paths or startup shortcut to that CFG. Use deployment tools for large-scale rollouts.

What is the difference between CFG, CUI, MNU, and PGP files?

  • CFG: General text-based configuration for startup commands and settings.
  • CUI: Binary/text file managed by the Customize User Interface editor for menus, ribbons, and toolbars.
  • MNU: Menu file containing menu definitions; can be loaded by CFG using MENULOAD.
  • PGP: Command alias file for custom shortcuts (not typically in CFG but often used together).

Can I edit a CFG while AutoCAD is running?

You can edit the file externally, but changes will not apply until AutoCAD re-reads the file or you manually execute the commands inside AutoCAD (or restart the application if the CFG is only read at startup).

Why does AutoCAD report syntax errors from my CFG file?

CFG files expect valid AutoCAD commands and correct syntax. Common causes:

  • Typographical errors or incorrect command names.
  • Missing quotes or incorrect path formatting.
  • Invalid command order. Test commands manually in AutoCAD to verify behavior.

How do I make my custom menus load automatically?

Add a MENULOAD line to your CFG that points to your .mnu file. Example:

MENULOAD “C:\CAD\Menus\mycustom.mnu”

Also ensure the menu file is in a location AutoCAD can access and that any dependent resources (icons, lisp files) are reachable.

Is there a recommended encoding for CFG files?

Use ASCII or UTF-8 without BOM for maximum compatibility. Some editors add a BOM that can cause parsing issues, so verify encoding if AutoCAD behaves unexpectedly.

How do I return to default settings if a CFG breaks something?

  • Restore the backed-up CFG file.
  • If you didn’t back up, rename the current CFG and restart AutoCAD to force default behavior.
  • Revert specific commands or remove recent changes incrementally to isolate the problem.
Read Also:  What is an AutoCAD CUI file?