1

I'm trying to read certain values from the annotation layer of a CAD file (MicroStation.dgn). It seems like for certain entities (Cell) the text isn't stored in the field 'TxtMemo' or 'Text'. When I use the Import CAD Annotation tool I see additional fields including 'TextString' which has the text value I'm trying to obtain.

Is there anyway to access this field directly using the SearchCursor tool directly on the CAD annotation features?

arcpy.da.SearchCursor(cad_annotations, 'TextString')

results in the error:

RuntimeError: A column was specified that does not exist.

I guess the workaround is to add additional code to do the import to a temporary location and read the data there but given that it can display the 'TextString' value when I add the CAD annotation layer to a map it seems like there should be some way to access it directly without the conversion. I'm just wondering if I'm missing something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.