Click or drag to resize

File3dmObjectTryReadUserData Method

Attempts to read a Rhino plug-in's custom userdata from the File3dmObject object.

Namespace:  Rhino.FileIO
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public bool TryReadUserData(
	Guid userDataId,
	bool readFromAttributes,
	Func<File3dm, BinaryArchiveReader, bool> dataReader
)

Parameters

userDataId
Type: SystemGuid
The id of the custom userdata object whose data you want to try to read
readFromAttributes
Type: SystemBoolean
Set true to attempt to read custom userdata object from the object's Attributes. Set false to attempt to read custom userdata object from the object's Geometry.
dataReader
Type: SystemFuncFile3dm, BinaryArchiveReader, Boolean
The function that will read the data. This function must be implemented identical to the the originating UserData-inherited class's Read method.

Return Value

Type: Boolean
The value returned by the data reading function if successful, false otherwise.
See Also