# Line

Creates a fixtured Line structure.

Inputs

The Line function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. has the following syntax:

Line(Image, X, Y, Theta, X0, Y0, X1, Y1, Show)

See the table for a description of the available parameters.

Parameter | Description
Image | This argument must reference a spreadsheet cell that contains a valid Image data structure. By default, the cell referenced is cell A0, containing the Image data structure returned by the AcquireImage function.
Fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture. | Specifies the image coordinate system in which the line is defined.
X | The X-offset from the image.
Y | The Y-offset from the image.
Theta | The rotation from the image X-axis, in the image coordinate system. (+/-360 degrees clockwise)
Line | Specifies the endpoints of the line.
X 0 | The X-offset of the first endpoint.
Y 0 | The Y-offset of the first endpoint.
X 1 | The X-offset of the second endpoint.
Y 1 | The Y-offset of the second endpoint.
Show | Specifies the display mode for the Line graphic overlay on the image.
0 = hide all (default) | The line structure is not be displayed unless the cell containing the Line function is highlighted in the spreadsheet.
2 = input graphics only | The line structure is always displayed .

Note: The Fixture and Line parameters must be defined within the bounds of the image. Otherwise, the function returns #ERR.
Outputs

Returns | A Line data structure, or #ERR if any of the input parameters are invalid.
Results | When Line is initially inserted into a cell, the following Structures Vision Data Access functions are automatically inserted into the spreadsheet to create a result table:
Label | Function | Description
X 0 | GetX(Line, 0) | The X-coordinate of the first endpoint, in image coordinates.
Y 0 | GetY(Line, 0) | The Y-coordinate of the first endpoint, in image coordinates.
X 1 | GetX(Line, 1) | The X-coordinate of the second endpoint, in image coordinates.
Y 1 | GetY(Line, 1) | The Y-coordinate of the second endpoint, in image coordinates.