Removes subrecord with the given key from this record.
Namespace: Cognex.VisionPro.InspectionAssembly: Cognex.VisionPro.Inspection (in Cognex.VisionPro.Inspection.dll) Version: 73.0.0.0 (73.0.0.0)
Syntax
Parameters
- key
- Type: System String
The key of the subrecord to remove
Exceptions
| Exception | Condition |
|---|---|
| Exception | Thrown if the key is null. |
| Exception | Thrown 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 Subusing 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