Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.10
|
Leadtools.Forms.Recognition Namespace > FormRecognitionAttributes Class : SetData Method |
'Usage Dim instance As FormRecognitionAttributes Dim data() As Byte instance.SetData(data)
public: void SetData( array<byte>^ data )
To start modifying the form's attributes you have to open it using OpenMasterForm for Master Forms or 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 your changes.
SetData is useful to set the loaded attributes data.
Imports Leadtools.Forms Imports Leadtools.Forms.Recognition Imports Leadtools.Codecs ''' This method loads the specified master form attributes. Public Function LoadMasterFormAttributes(attributesFileName As String) As FormRecognitionAttributes Dim formData As Byte() formData = File.ReadAllBytes(attributesFileName) Dim attributes As New FormRecognitionAttributes() attributes.SetData(formData) Return attributes End Function
using Leadtools.Forms; using Leadtools.Forms.Recognition; using Leadtools.Codecs; /// 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; }