FormFix v6.0 for .NET - Updated
Form Definition
Developer Guide > How To > Use FormDirector > Store Data & Operations > Form Definition

Create and Write to Persistent Storage

Creation of a FormDefinition relies on the existence of a FormSetFile object. For more information on creating a FormSetFile object see Store Data and Operations > FormSet. The steps below rely on a FormSet object already existing.

  1. Set the NewFormFilenamePrefix and NewFormFilenameSuffix of the FormSetFile object.
  2. Create an instance of the FormDefinitionFile class by calling the CreateNewForm method of the FormSet class
  3. Lock the FormSetFile using the Lock method.
  4. Set the Name and UserTag properties.
  5. Add a TemplateImage to the TemplateImages collection
    1. Create a new TemplateImage object.
      See Store Data and Operations > TemplateImage
    2. Add it to the TemplateImages collection using the Add method
  6. Add one or more Fields to the Fields collection
    1. For each field to be added to the Fields collection
      1. Create a new Field object.
        See Store Data and Operations > Field
      2. Add the Field object to the Fields collection using the Add method.
  7. Add processing operations to the Operations collection
    These are operations to be performed on a filled image after it has been identified as a specific form. See Integrating with ScanFix.
    1. For each operation to be added to the collection
      1. Create a DataItem to represent the operation to be performed on the field clip.
        See Storing Data and Operations > DataItem.
      2. Add this DataItem to the Operations collection using the Add method.
  8. Add DataItems to the OtherDataItems collection
  9. Write all of the information to persistent storage using the Write method
  10. Unlock the file using the Unlock method.

Edit OtherDataItems and Write to Persistent Storage

This sequence shown below used to store information when an Accusoft component asks you to store information on its behalf during form processing. This is a use case that FormFix takes advantage of; for more information about when FormFix will request storage of data in form processing, see the FormFix help file.

  1. Lock the FormDefinition object
  2. Create a new DataItem object
    See Storing Data and Operations > DataItem.
  3. Set the DataItem object’s Type string to “FormFix-Internal/”
  4. Write the current state of the FormDefinition object to persistent storage using the Write method
  5. Unlock the FormDefinition object

Load from Persistent Storage

  1. Load the FormSet object
  2. Get the FormDefinition object from the FormDefinitions collection of the FormSet object
  3. Call the Read method of the FormDefinition object
See Also
Is this page helpful?
Yes No
Thanks for your feedback.