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

Get TypedLoop When Parsing

Nov 27, 2013 at 4:41 PM
How can I get a TypedLoop (more specifically for my case, a TypedLoopNM1) out of an Interchange object that is returned from calling Parser.ParseMultiple(string)? It seems that when I use ParseMultiple, I only get Loop objects, but I think it would be useful to convert those to their respective Typed implementations.

What I'm trying to do in this case is to create a 271 while processing a 270. Some of the information in the 271 can just be copied directly from the 270, but right now my code is a bit dense with a lot of SetElement(x, GetElement(x)).
Nov 27, 2013 at 5:40 PM
Actually, on second thought, it is easier to just iterate through all of the elements and blindly copy them using the ElementCount as a bounds on a for loop.

I am still interested in the answer to this question though. That is, how do I get a TypedLoop out of a parsing result?