Hello,

Please consider the attached file 2.dwg.

There is an LWPolyline entity with handle **1019** that should be closed.

By looking at the [dxf group codes docs](http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WS1a9193826455f5ff18cb41610ec0a2e719-79fc.htm) I see that the closed flag value of a LWPolyline is 1 (bit-coded), and the other possible flag values are 0 and 128.

But looking at the json file the flag value is 528, 001000010000. See below.

![image](https://user-images.githubusercontent.com/38076337/224365865-a72605ce-a9b7-4912-b22d-ed9338041517.png)

I am aware that this is not a dxf file and that the flag value might differ, but the [OpenDesign Specification](https://www.opendesign.com/files/guestdownloads/OpenDesign_Specification_for_.dwg_files.pdf) is not helping much.

I did a few tests and the 512 bit seems to be the right flag value for a closed LWPolyline in this case, is this ok? Should I just keep that as the right value or am I missing something?

Thank you.

[2.zip](https://github.com/LibreDWG/libredwg/files/10943763/2.zip)
LWPolyline closed flag
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : LWPolyline closed flag
Issue date:

--- start body ---
Hello,

Please consider the attached file 2.dwg.

There is an LWPolyline entity with handle **1019** that should be closed.

By looking at the [dxf group codes docs](http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WS1a9193826455f5ff18cb41610ec0a2e719-79fc.htm) I see that the closed flag value of a LWPolyline is 1 (bit-coded), and the other possible flag values are 0 and 128.

But looking at the json file the flag value is 528, 001000010000. See below.

![image](https://user-images.githubusercontent.com/38076337/224365865-a72605ce-a9b7-4912-b22d-ed9338041517.png)

I am aware that this is not a dxf file and that the flag value might differ, but the [OpenDesign Specification](https://www.opendesign.com/files/guestdownloads/OpenDesign_Specification_for_.dwg_files.pdf) is not helping much.

I did a few tests and the 512 bit seems to be the right flag value for a closed LWPolyline in this case, is this ok? Should I just keep that as the right value or am I missing something?

Thank you.

[2.zip](https://github.com/LibreDWG/libredwg/files/10943763/2.zip)
--- end body ---
