open function. The open function returns this pointer as an alphanumeric label. You supply the file descriptor as an argument to other AutoLISP functions that read or write to the file.
A file descriptor is a pointer to a file opened by the AutoLISPopen function returns the file descriptor:
The following example opens the myinfo.dat file for reading. The_$ (setq file1 (open "c:\\myinfo.dat" "r") )
#<file "c:\\myinfo.dat">
file1variable.
In this example, the file descriptor is stored in theclose function closes a file. The following code closes the file whose file descriptor is stored in the file1 variable:
Files remain open until you explicitly close them in your AutoLISP program. The_$ (close file1)
nil