Thankyou! saw the updated comments in the point.py function which got me on the right track. I'm new to Python and finding it great!
Code below works well. imports points from CSV file into a new DXF with the point style & size set & point ID on separate layer.
CSV Format: PT_ID, X, Y, Z (comes out like that from my survey equipment)
Point ID is offset from the point a little so it dosen't overlap it.
import ezdxf
import csv
doc = ezdxf.new('R2010')
msp = doc.modelspace()
# Setup DXF - units already in Metres
doc.layers.new(name='Point', dxfattribs={'color': 5})
doc.layers.new(name='ID', dxfattribs={'color': 2})
doc.header['$PDMODE'] = 2
doc.header['$PDSIZE'] = 0.05
# Import CSV, Write points to DXF
with open('input.csv', newline='') as csvfile:
lineread = csv.reader(csvfile, delimiter=",")
for row in lineread:
msp.add_text(row[0], dxfattribs={'height': 0.02, 'layer': 'ID'}).set_pos((float(row[1])+0.02,float(row[2])+0.02,float(row[3])), align='LEFT')
msp.add_point((float(row[1]), float(row[2]), float(row[3])), dxfattribs={'layer': 'Point'})
doc.saveas('output.dxf')
Cheers.