If there are zero-length segments, then what should GetParameterAtPoint() return given the point at two or more coincident vertices ?
Methinks, that beith the problem... These Curve Methods are seemingly not equipped to handle such circumstances.
Does this mean that (as a generalization) one should iterate a given Curve for GetPointAtParameter to test for Zero length before continuing with one's own code, or perhaps instead simply catch this exception, and prompt the user to address this possibility?
Better still, am I completely overlooking a simpler solution (I am very much still learning the craft of development)?
You can either catch the exception and tell the user something is wrong with the polyline, but you don't know exactly what it is, or you can interrogate the polyline before the fact, to try to determine if it will be rejected, and give the user a more meaningful reason.
AutoCAD's Curve, Solid, and Region APIs are brain-dead in that regards, because they don't provide any clue about what is unacceptable or invalid given an object. If you look at the REGION command's behavior, you'll notice that it gives you details on what happened, or what objects were rejected and the reason why they were. We don't have access to those APIs, which unfortunately, seems to be the status-quo with plain vanilla AutoCAD APIs.