This project has moved and is read-only. For the latest updates, please go here.

Create Message with API and Generate X12

Jun 23, 2011 at 6:52 PM
Edited Jun 23, 2011 at 7:24 PM


I'm trying to create an 835 message, populate it from my DAL model, then generate an X12 string (file).


I think I can figure out the second and third parts, but how do I instantiate an instance of the 835 message Interchange?


Along the same line, are there any hard classes to code against, per the xml specification? Or is it just the xml specification file?


Ideally, I'd like to do something like



var message = new Message835();
var nm1 = ISASegment();
nm1.LastName = "Doe";
var x12 = message.ToString();

Thanks, project looks great and very extensible.

Jun 23, 2011 at 7:31 PM
Edited Jun 23, 2011 at 7:32 PM

I have been meaning to update the following documentation with this very description that you are asking for.

The Interchange would be instantiated by calling either of the constructions below:

 public Interchange (DateTime date, int controlNumber, bool production)

 public Interchange(DateTime date, int controlNumber, bool production, char segmentTerminator, char elementSeparator, char subElementSeparator)

once you are done you will be able to call the ToX12String method to get your X12.

I will work on updating the document page to have a complete code segment and will update this discussion once I am done.  I will start on it tonight.

 Feel free to suggest an other extensibility you will need.  I have focused mostly on parsing files, but do intend to support any needed features for creating files.



Jun 23, 2011 at 7:35 PM

Thank you!


And is there some kind of class model that corresponds to the Ansi specification xml?

Jun 25, 2011 at 7:17 PM

I have add the class model for the specification here: