VS:GetLastFileErr/ja

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

ファイルの入出力作業でエラーが発生した場合に、エラーコードを返します。

FUNCTION GetLastFileErr : INTEGER;
def vs.GetLastFileErr():
    return INTEGER

Example

UseDefaultFileErrorHandling(FALSE);
Open(Concat(pathName, fileName));
errorCode := GetLastFileErr;
IF errorCode <> 0 THEN
	CASE errorCode OF
		 2: AlrtDialog(Concat('The file "', fileName, '" cannot be processed because the hard drive is full.'));
		 4: AlrtDialog(Concat('End of file "',   fileName, '" reached prematurely.'));
		 5: AlrtDialog(Concat('The file "', fileName, '" is locked.'));
		 6: AlrtDialog(Concat('The file "', fileName, '" not found.'));
		10: AlrtDialog(Concat('The file "', fileName, '" currently in use by another program.'));
		13: AlrtDialog(Concat('The file path "', pathName, '" does not exist.'));
		OTHERWISE AlrtDialog(Concat('The file "',fileName,'" has encountered an undetermined error.'));
	END;

Version

利用可能バージョン: VectorWorks8.5