>>How can I get all entities in lwpolyline
There arent any "entities" in a polyline - you wont find a list of lines and arcs ... what you will find is a list of Coordinates.
If you check the help under the coordinates function, there is some sample code that will get you started.
A couple of things that you WONT see in the example for the help file:
1) You have to check the polyline for the .Closed property. If the polyline is closed, then acad automatically draws a line from the last coordinate, to the first coordinate. if your polyline is closed, and it looks like it is, then you'd have to account for the 'missing' 4th coordinate.
2) if the polyline has arcs in it, you will have to figure out the radii by using the .GetBulge method. Its about as intuitive as using radians instead of degrees, but its just something you have to get used to.
3) The polyline object can have different widths along each segment: you have to check with the .GetWidth method... your polyline looks to have width to it.
4) and lastly, there are different types of polylines - three, at my last count, and depending on your version of the drawing .... there is a 'regular' polyline, a lighweight polyline, and a 3d polyline. Each of these types has slightly different features to them.