EDIT 3 :
In DXF a 3D polyline is a POLYLINE and so far what I'm getting is LWPOLYLINE with the DXF that I've generated.
Source : http://docs.autodesk.com/ACD/2014/ENU/
This a sample of the dxf I've produced :
SECTION
2
ENTITIES
0
LWPOLYLINE
5
20000
8
0
100
AcDbEntity
100
AcDbPolyline
70
0
90
17
10
871445.368819307
20
176723.75933446
38
335.327438654427
10
871406.15681453
20
176721.775169337
38
329.303427483617
10
871430.247781684
20
176680.644249806
38
329.181349425104
10
871442.587057543
20
176678.881496111
38
329.223628419705
10
871458.451840791
20
176666.542220252
38
340.904712531814
10
871440.824303849
20
176633.637484627
38
340.761815791952
10
871413.795413871
20
176642.451253098
38
329.367577920776
10
871405.569229965
20
176620.710624203
38
329.374567538369
10
871403.806476271
20
176613.072024862
38
329.598040695032
10
871389.704446718
20
176577.816950978
38
339.420990431382
10
871367.963817823
20
176595.44448792
38
328.878231781793
10
871355.624541963
20
176607.783763779
38
330.699957902362
10
871347.985942622
20
176620.123039638
38
331.029891518627
10
871337.409420457
20
176617.77270138
38
329.987317651824
10
871325.070144597
20
176623.648547027
38
327.790318474242
10
871353.861788269
20
176665.367051123
38
329.183225279327
10
871368.551402387
20
176734.702029761
38
328.573434984486
0
ENDSEC
As you can see my output contains 3D points, but the format is somehow saying that this is 2D at a fixed z. I checked it is fixed at 328.5734, the z of the last point.
This is a DXF with the kind of object that I want :
SECTION
2
ENTITIES
0
POLYLINE
5
76
330
1F
100
AcDbEntity
8
0
100
AcDb3dPolyline
66
1
10
0.0
20
0.0
30
0.0
70
8
0
VERTEX
5
77
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
-2.682663316582904
20
235.6055276381909
30
0.0
70
32
0
VERTEX
5
78
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
11.74257787156506
20
173.1071513625327
30
0.0
70
32
0
VERTEX
5
79
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
135.7183417085427
20
173.1798994974874
30
0.0
70
32
0
VERTEX
5
7A
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
-133.6656858850508
20
97.48688849752057
30
20.0
70
32
0
VERTEX
5
7B
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
-80.43453010615633
20
72.80698900003313
30
20.0
70
32
0
VERTEX
5
7C
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
220.3247608051047
20
40.44340560335991
30
0.0
70
32
0
VERTEX
5
7D
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
123.620351758794
20
47.36080402010046
30
0.0
70
32
0
VERTEX
5
7E
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
30.22386934673369
20
62.8462311557789
30
0.0
70
32
0
VERTEX
5
7F
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
-35.5891959798995
20
146.0804020100502
30
0.0
70
32
0
VERTEX
5
80
330
76
100
AcDbEntity
8
0
100
AcDbVertex
100
AcDb3dPolylineVertex
10
-38.49271356783919
20
251.5748743718593
30
0.0
70
32
0
SEQEND
5
81
330
76
100
AcDbEntity
8
0
0
ENDSEC