e.get_dxf_attrib('location')
I'm told "DXFAttrib 'location' does not exist."
I've attached an example file.
Thanks for any hints.
Hamish
import dxfgrabber
dwg = dxfgrabber.readfile("Leica_Disto_S910.dxf")points = (entity for entity in dwg.modelspace() if entity.dxftype == 'POINT')for num, point in enumerate(points): print("#{num}: {location}".format(num=num, location=point.point))
import ezdxf
dwg = ezdxf.readfile("Leica_Disto_S910.dxf")msp = dwg.modelspace()
for num, point in enumerate(msp.query('POINT')): print("#{num}: {location}".format(num=num, location=point.dxf.location))dwg.saveas("Leica_Disto_S910_by_ezdxf.dxf") # saves a valid DXF R12 file
Added a repair function to ezdxf (0.7.7 not released yet):
import ezdxffrom ezdxf.lldxf.repair import repair_leica_disto_dxf12
dwg = ezdxf.readfile("Leica_Disto_S910.dxf")
repair_leica_disto_dxf12(dwg)
msp = dwg.modelspace()for num, point in enumerate(msp.query('POINT')):print("#{num}: {location}".format(num=num, location=point.dxf.location))
Best regards,
Manfred
Am Freitag, 13. Mai 2016 18:09:11 UTC+2 schrieb Hamish Harvey:Hi,I'm trying to read a DXF file from a leica disto S910 with ezdxf. I'm not getting very far. Would appreciate any pointers.The disto records 3D points and, as far as a can tell, joins them with lines. It also annotates each point with text showing the file name of a jpg image.I can read the file with ezdxf, enumerate the entities, and get their types (POINT, LINE, TEXT). However if I ask for the location of a point:e.get_dxf_attrib('location')
I'm told "DXFAttrib 'location' does not exist."
I've attached an example file.
Thanks for any hints.
Hamish
--
You received this message because you are subscribed to a topic in the Google Groups "python-ezdxf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ezdxf/YARu5ogq-2w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-ezdxf...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.