Leadtools.Forms.Recognition Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
SetData Method
See Also  Example
Leadtools.Forms.Recognition Namespace > FormRecognitionAttributes Class : SetData Method



data
Array of bytes containing the encoded attributes.
data
Array of bytes containing the encoded attributes.
Sets the array of bytes containing the encoded attributes.

Syntax

Visual Basic (Declaration) 
Public Sub SetData( _
   ByVal data() As Byte _
) 
Visual Basic (Usage)Copy Code
Dim instance As FormRecognitionAttributes
Dim data() As Byte
 
instance.SetData(data)
C# 
public void SetData( 
   byte[] data
)
C++/CLI 
public:
void SetData( 
   array<byte>^ data
) 

Parameters

data
Array of bytes containing the encoded attributes.

Example

Visual BasicCopy Code
''' This method loads the specified master form attributes.
Public Function LoadMasterFormAttributes(ByVal attributesFileName As String) As FormRecognitionAttributes
   Dim formData As Byte()
   formData = File.ReadAllBytes(attributesFileName)
   Dim attributes As FormRecognitionAttributes = New FormRecognitionAttributes()
   attributes.SetData(formData)
   Return attributes
End Function
C#Copy Code
/// This method loads the specified master form attributes. 
public FormRecognitionAttributes LoadMasterFormAttributes(string attributesFileName) 

   byte[] formData; 
   formData = File.ReadAllBytes(attributesFileName); 
   FormRecognitionAttributes attributes = new FormRecognitionAttributes(); 
   attributes.SetData(formData); 
   return attributes; 
}

Remarks

Forms attributes that are generated by FormRecognitionEngine.CreateMasterForm for Master Forms or FormRecognitionEngine.CreateForm for Forms will have the form's attributes that are specified in FormRecognitionEngine.ObjectsManagers.

To start modifying the form's attributes you have to open it using FormRecognitionEngine.OpenMasterForm for Master Forms or FormRecognitionEngine.OpenForm for Forms, or create it using FormRecognitionEngine.CreateMasterForm for Master Forms or FormRecognitionEngine.CreateForm for Forms.

Forms attributes data will be updated with the changes you made to the form attributes such as addition of a page or deletion of a page once the attributes is closed using either FormRecognitionEngine.CloseMasterForm for Master Form attributes or FormRecognitionEngine.CloseForm for Form attributes.

Once you finish modifying the form's attributes close it to reflect yoru changes.

SetData is useful to set the loaded attributes data.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features