Klaus,
drawing polylines is not easy with FrameMaker, as it depends on the order of points and also the settings of polyline properties also.
Fortunately I don't need to do this in my projects :-) but I did this in a very long time ago and remember the battle with FrameMaker.
What I would do is to draw a polyline that I expect, and check to points and the order they are set. After that, I would take exactly the same settings, and create the polyline by code with exactly the same values for each point shown in databrowser.
As soon as this works, I would add the same polyline with my own points. And as soon as this fits to, I would change polyline properties.
BTW:
oPoly.Color = 0; // black?
Color is an Object, and you have to get it from FM with doc.GetNamedColor("Black").
Please note Standard Color names are localized. You won't get "Black" in a German FM. You Need to call "Schwarz" or "Noir" for French FM.
and for this
oPoly.Fill = 15
I would use FM constans. Something like Constants.FV_FILL