Managing AutoLISP Files (AutoLISP/VS Code)

VS Code provides you with several ways to manage your AutoLISP source code files.

When working in VS Code, you can manage your source code files using a combination of:

Store Source Files in Folders

Source code files are stored in a folder on a local and network drive. A single folder can be used to organize all of your source code files or you can use multiple folders to logically group your source code files based on their intended purpose. When working in VS Code, you can open a folder which provides access to all files and subfolders in that folder from the Explorer view on the Activity bar.

Control Source with Git Repositories

The git source control manager (SCM) extension is installed with VS Code. You can access the features of git by opening a folder that represents a git repository or clone from a URL. Once a git repository or clone has been opened, you can:

For more information on the Git extension and other SCM Provider extensions, see Using Version Control in VS Code on the Microsoft.com website.

Access Source Files with AutoLISP Projects (Recommended)

AutoLISP projects allow you to logically group AutoLISP source (LSP) files. An AutoLISP project is saved to a file with the .prj extension. PRJ files contain references to LSP files that are already stored in a local or network folder, or a folder that represents a git repository. The AutoCAD AutoLISP Extension defines a view on the Activity bar named AutoLISP Project Manager from which you can create and open PRJ files.

Once a PRJ file has been opened, you can

Note: On Windows only, PRJ files can be used to compile several LSP files into a single Visual LISP executable (VLX) file.

The AutoLISP Project Manager consists of two panes; PROJECT and FIND & REPLACE.

The following explains the tools that are part of each pane.

PROJECT Pane

Contains tools used to create and open an AutoLISP project from which you can manage your AutoLISP source (LSP) files.

Current Project

Name of the project currently open in the AutoLISP Project Manager.

Toolbar

Current Project - Secondary Menu

  • Add File to Project - Adds an AutoLISP source (LSP) file to the current project.
    Note: Starting with version 1.4.0 of the AutoCAD AutoLISP Extension, you can add one or more an AutoLISP source (LSP) files from an open folder on the Explorer view.
  • Refresh - Refreshes the current project.
  • Save Project - Saves changes to the current project. Changes to project are normally automatically saved, but if an error occurs the changes might not be automatically saved.
  • Save All - Saves all the LSP files that are currently open in editor windows and associated with the current project.

LSP File - Secondary Menu

  • Remove File from Project - Removes an AutoLISP source (LSP) file from the current project. The LSP file is only removed from the project, not from the local or network drive.
FIND & REPLACE Pane

Contains tools used to find and replace text strings within the AutoLISP source (LSP) files that are in the current project.

Toolbar

  • Find in Project - Displays the Find in Project dialog box. This dialog box allows you to enter the text string to search for and specify the match options to use during the search.
  • Replace in Project - Displays the Find in Project and Replace in Project dialog boxes. Theses dialog boxes allow you to enter the text string to search for and replace with, and specify the match options to use during the search.
  • Stop Search - Cancels the search for the text string in the LSP files.
  • Clear All Search Results - Clears the entries from the Search results list.