# CogRecord Creator

When executed, the CogRecordCreator block creates a VisionPro CogRecord object from an image and any number of VisionPro CogGraphicCollections.

The graphics from all input CogGraphicCollections are added to the output CogRecord, such that this block can be used to merge graphics from multiple sources into a single CogRecord for display. When used with no CogGraphicCollection inputs, a CogRecord containing just the input image is created. This is commonly used to clear graphics from a display.

Here is an example to show the difference between ICogImage and ICogRecord:

ICogImage:

ICogRecord

CogDisplay or CogRecordDisplay on HMI can either choose ICogImage or ICogRecord to display, this can be customized by changing Display’s “Source” property.

## General Information

Class name: CogRecordCreatorBlock

Namespace: Cognex.Designer.AlignPlus.Utils

Assembly: Cognex.Designer.AlignPlus.Utils.dll

## Inputs

Name | Type | Description
--- | --- | ---
Image | ICogImage | The input image
Graphics | CogGraphicCollection | A CogGraphicCollection to add to the output record.

## Outputs

Name | Type | Description
--- | --- | ---
OutputRecord | ICogRecord | The output CogRecord object

## Properties

Additional pins of this type are created based on the Number of Graphic Inputs property.

Name | Type | Description
--- | --- | ---
Number of Graphic Inputs | Int32 | Set/get the number of input graphic collections. This block will create an input pin for each graphic collection. Must be >= 0 and <= 16. The default is 1. If the value on a graphic input pin is non-null, then the given graphic collection is added to the output record. If the pin is unconnected or has a value of null, then it does not contribute to the output record. Throws System.ArgumentOutOfRangeException: If the setter value is less than one or greater than 16