I'm using the OopFactory in my project and I'm consuming a Loop object and I want to find a certain Segment in his Segments.
acknowledgementCode = "Not Found";
foreach (Segment segment in loop.Segments)
if (segment.SegmentId == "AK5") //<-Can't really do that because SegmentId is internal in OopFactory.X12
if (segment.ElementCount < 1)
//Throw a custom error.
acknowledgementCode = segment.GetElement((int)TransactionSetResponseHeaderIndex.AcknowledgementCode);
Is there a better way to find the "AK5" segment I'm looking for?