# (load filename \[flag\]) [GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="213"></a> ## (load filename \[flag\]) --- Load that LISP file. --- LISP program files must be loaded into GstarCAD® before they can be run. The **load** function must be enclosed in parentheses, or GstarCAD will try to load a text or shape file. The *filename* argument represents the name of the LSP file to load. You need not enter the file type *.lsp,* since this is assumed. The *filename* can also include the directory path. If one is not included, GstarCAD searches the environmental paths specified in the configuration. If the LSP file is found and loaded, the last expression in the program is returned to the command line. If the file is not found, the program displays an error message indicating that the load failed. You may want to have the program display some other specified string, represented by the optional *flag* argument. ### Examples The following examples assume that *invalid.lsp* does not exist and *valid.lsp* does. The last expression in valid.lsp is LST-FUNCT. | Code | Returns | | --- | --- | | (**load** "valid") | LST-FUNCT | | (**load** "\\\\sample\\\\valid") | LST-FUNCT | | (**load** "invalid") | Load failed error | | (**load** "invalid" "Does not exist.") | "Does not exist." | **Tell me about...** [(atoms-family format \[symbol1 symbol2 ...\])](%28atoms-family%20format%20-symbol1%20symbol2%20...-%29.md) [(command cmd \[arguments\] ...)](%28command%20cmd%20-arguments-%20...%29.md) [(load\_dialog filename)](%28load_dialog%20filename%29.md) [(menucmd string)](%28menucmd%20string%29.md) [(xload appname \[flag\])](IDR_LISP_B313.md) [LISP Compatibility](../LISP%20Compatibility.md) [Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md) <a id="holding"></a> ## Other versions with matching text [GstarCAD 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28load%20filename%20-flag-%29.md)