VS:GetLastFileErr/ja: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(No difference)

Latest revision as of 14:32, 12 August 2013

.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