Click or drag to resize

GH_ArchiveWriteToFile Method

Writes the current tree to a file.

Namespace:  GH_IO.Serialization
Assembly:  GH_IO (in GH_IO.dll)
Syntax
public bool WriteToFile(
	string fileName,
	bool overwrite,
	bool rememberPath
)

Parameters

fileName
Type: SystemString
Path of file to write to. If the extension is not a recognized Grasshopper extension, an exception will be thrown.
overwrite
Type: SystemBoolean
True to overwrite file at specified location.
rememberPath
Type: SystemBoolean
If True, the MRU path field will be updated to reflect the new path.

Return Value

Type: Boolean
True on succes, false if file already exists and overwrite is set to false.
Exceptions
ExceptionCondition
MemberAccessExceptionThrown if the root of the current archive hasn't been instantiated yet.
ArgumentNullExceptionThrown if file_name is either null or empty.
IOExceptionThrown if the file_name doesn't represent a known file extension.
See Also