Serializer SaveObjectToFile Method (, String, SerializerOptionsConstants)Cognex VisionPro 9.25 SR1

Save an object to a file, with option bits that cause fields to be selectively persisted.

Namespace: Cognex.Vision
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.25.1.0
Syntax

public static void SaveObjectToFile(
	IObject obj,
	string path,
	SerializerOptionsConstants option
)

Parameters

obj
Type: IObject
The object to save.
path
Type: System String
The path to the file.
option
Type: Cognex.Vision SerializerOptionsConstants
The option bits specifying what should be persisted.
Exceptions

ExceptionCondition
FileOpenExceptionAn error occurred while opening the specified file.
ArgumentExceptionThe supplied object reference is null.
ArgumentExceptionThe path argument is not a valid file name.
ArgumentExceptionThe option argument is not valid.
See Also