Analyze layout
The Analyze Layout activity uses the Form Recognizer Analyze Layout API to extract layout information from a specified document (File Path or File URL).
After completing the operation, the activity outputs the recognition results in an AnalyzeOperationResult object (Response Object) and the understanding results in Page[] object (Pages). Both of these outputs can be used as input variables in subsequent activities (e.g., conditional logic).
How it works
The following steps and message sequence diagram is an example of how the activity works from design time (that is, the activity dependencies and input/output properties) to run time.
- Complete the Setup steps.
- Add the Azure Form Recognizer Scope activity to your project.
- Add the Analyze Layout activity inside the Azure Form Recognizer Scope activity.
- Enter values for the Input properties.
- Create and enter the
AnalyzeOperationResultandPage[]variables for the Output properties. - Run the activity.
-
Your input properties are sent to the Analyze Layout API.
-
The API returns the
AnalyzeOperationResultandPage[]values to your output property variables.
-
Properties
The values for the following properties are specified when adding this activity to your project in UiPath Studio.
Common
DisplayName
The display name of the activity.
| Attributes | Details |
|---|---|
| Type | String |
| Required | Yes |
| Default value | Analyze Layout |
| Allowed values | Enter a String or String variable. |
| Notes | N/A |
Input
File URL
The URL to the file that you want to analyze.
| Attributes | Details |
|---|---|
| Type | String |
| Required | Yes (if File Path is empty) |
| Default value | Empty |
| Allowed values | Enter a String or String variable. |
| Notes | Enter a value for either File URL or File Path (not both). Supported receipt file formats: PNG, JPEG, TIFF, and PDF (all other format types are ignored). |
File Path
The local path to the file that you want to analyze.
| Attributes | Details |
|---|---|
| Type | String |
| Required | Yes (if File URL is empty) |
| Default value | Empty |
| Allowed values | Enter a String or String variable. |
| Notes | Enter a value for either File URL or File Path (not both). Supported receipt file formats: PNG, JPEG, TIFF, and PDF (all other format types are ignored). |
Common
TimeoutMS
Specifies the amount of time to wait (in milliseconds) for the analyze operation to complete before an error is thrown.
| Attributes | Details |
|---|---|
| Type | Int32 |
| Required | No |
| Default value | 30000ms ((30 seconds) not shown) |
| Allowed values | Enter a Int32 or Int32 variable. |
| Notes | N/A |
Misc
Private
If selected, the values of variables and arguments are no longer logged at Verbose level.
| Attributes | Details |
|---|---|
| Type | Checkbox |
| Required | No |
| Default value | Not Selected |
| Allowed values | Selected or Not Selected |
| Notes | N/A |
Output
Response Object
The operation response as a deserialized object.
| Attributes | Details |
|---|---|
| Type | AnalyzeOperationResult |
| Required | No (required to use the output data in subsequent activities) |
| Default value | Empty |
| Allowed values | Enter a AnalyzeOperationResult variable |
| Notes | To get the JSON string representation, use the ToString method. If the model can't find a field, a null value is returned. |
Pages
The results of the analysis, including the key-value pairs and layout information extracted from the page.
| Attributes | Details |
|---|---|
| Type | Page[] |
| Required | No (required to use the output data in subsequent activities) |
| Default value | Empty |
| Allowed values | Enter a Page[] variable |
| Notes | Each Page object includes KeyValuePairs and Tables properties. |