Create a New File from the Menu Bar
Note: Use this technique when creating a new LSP file to be added to an AutoLISP project (PRJ) file. If you are working with an open folder on the Explorer view, the new file created will need to be saved to the open folder.
- In Visual Studio Code, click File menu > New File.
- Click File menu > Save As.
- In the Save As dialog box, File Name text box (or Save As text box on Mac OS), select the default name and type the new file name.
- After the file name, type one of the following extensions to specify the format for the new file:
-
.dcl - Dialog Control Language (DCL) file
-
.mnl - AutoLISP Menu source (MNL) file
-
.lsp - AutoLISP source (LSP) file
For example, enter
sample.lsp to create an AutoLISP source (LSP) file with the name
sample.
- Click Save.
Since an LSP file can be added to multiple AutoLISP projects or none at all, you will need to manually add the LSP file to the AutoLISP project files from which you want to manage the file. See
To Manage Source Files with an AutoLISP Project on how to add an LSP file to an AutoLISP project.
Create a New File from the Explorer View
Note: A folder must be open to use this technique of which is not required when managing files with the AutoLISP Project Manager.
- In Visual Studio Code, on the Activity Bar, click Explorer (or click View menu > Explorer).
- In the Explorer view, adjacent to the open folder's name, click New File.
- In the in-place editor, enter the name and extension for the new file.
For example, enter
sample.lsp to create an AutoLISP source (LSP) file with the name
sample.