Composite Element Example?

Oct 24, 2013 at 5:13 PM
I ran into a scenario where I am building an X12 852 document. Under the LIN loop I am using an N9 segment. So far I am fine adding the various elements, up until the point where I need to add a composite element. Here is what I'm trying to add Image
Linked here

I looked on this project website and Googled around but no luck finding an example of how to do this. There is the AddSegment(int,, value) method, but no AddCompositeSegment(int, int, value) method. Or something along those lines.

Any suggestions?
Oct 24, 2013 at 5:35 PM
Currently I have worked around the situation by just manually adding the element using a string, with the colon delimiter as part of the inferred composite nature of what I need. Like
seg = linLoop.AddSegment("N9");  
seg.SetElement(7, "IN:" + strConsigneeInvoiceNumber);
This parses okay in my EDI Notepad so I am assuming this is a workaround. Unless I'm missing something in terms of properly using the SetElement() method in the X12Parser...