CogVerificationParamsExpectedOutputsContainer Remove Method Cognex VisionPro 9.5
Removes subrecord with the given key from this record.

Namespace: Cognex.VisionPro.Inspection
Assembly: Cognex.VisionPro.Inspection (in Cognex.VisionPro.Inspection.dll) Version: 69.0.0.0 (69.0.0.0)
Syntax

public void Remove(
	string key
)
Exceptions

ExceptionCondition
ExceptionThrown if the key is null.
ExceptionThrown if the key is not found.
Examples

Imports Cognex.VisionPro
Imports Cognex.VisionPro.Database
Imports Cognex.VisionPro.Inspection

Private Sub New()
        Dim mInputDatabase As New CogVerificationDatabase(New CogDatabaseDirectory("C:\SampleDatabase"))
        mInputDatabase.Connect()

        Dim mCurrentRecord As CogVerificationData = mInputDatabase.Fetch(0)

        ' Remove additional property "Area" from the record
        mCurrentRecord.Params.ExpectedOutputs.Remove("Area")

        ' Update the record in the database
        mInputDatabase.Replace(mCurrentRecord)

        mInputDatabase.Disconnect()
End Sub
using Cognex.VisionPro;
using Cognex.VisionPro.Database;
using Cognex.VisionPro.Inspection;

private RemoveProperty()
{
    CogVerificationDatabase mInputDatabase = new CogVerificationDatabase(new CogDatabaseDirectory(@"C:\SampleDatabase"));
    mInputDatabase.Connect();

    CogVerificationData mCurrentRecord = mInputDatabase.Fetch(0);

    // Remove additional property "Area" from the record
    mCurrentRecord.Params.ExpectedOutputs.Remove("Area");

    // Update the record in the database
    mInputDatabase.Replace(mCurrentRecord);

    mInputDatabase.Disconnect();
}
See Also