I created a program that searches through multiple subdirectories, reads a specific .txt file and finds the relevant info then stores it in a list. It then needs to open a dxf, read the text, if a certain condition is met, replace the text from list, then write the text to the same location. The problem is I can't find a way to find the text location from reading the ezdxf documentation. In the example, they're using a line
print("LINE on layer: %s\n" % e.dxf.layer)
print("start point: %s\n" % e.dxf.start)
print("end point: %s\n" % e.dxf.end)
so I just modified mine to read
def print_entity(e):
print(e.dxf.text)
print(e.dxftype())
print(e.pos)
print(e.start)
print(e.location)
for e in msp.query('TEXT[layer=="TEXT"]'):
print_entity(e)
However none of those give me the position of the text. Any ideas?