RhinoCommon API
File3dmObjectTryReadUserData Method |
Attempts to read a Rhino plug-in's custom userdata from the File3dmObject object.
Namespace: Rhino.FileIO
Assembly: RhinoCommon (in RhinoCommon.dll)

public bool TryReadUserData( Guid userDataId, bool readFromAttributes, Func<File3dm, BinaryArchiveReader, bool> dataReader )
Public Function TryReadUserData ( userDataId As Guid, readFromAttributes As Boolean, dataReader As Func(Of File3dm, BinaryArchiveReader, Boolean) ) As Boolean
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: BooleanThe value returned by the data reading function if successful, false otherwise.
