How to extract the tag associated with the text value from dxf block layout.
Here is a screenshot:
For example, TITLE is the header that comes as part of drawing format layout, DESC is the text tag associated with the TITLE Content "BASE". How can I extract the DESC (&TITLE) with TITLE Content.
I tried viewing the dxf file in notepad but doesn't have these tag entries. Is there a way to extract not only the text but also the associated tag?
For those that are new to ezdxf (like me), it took me a while to realise that on scenario 2 above, the .get_text() method in MTEXT has been replaced with .text since ezdxfVersion 0.10 released on 2019-09-01.
Therefore, I had to replace the following code in scenario 2 above:
with the following:
Other than that, the code from mozman worked great to extract the tags associated with text in layouts (msp or psp).