개정판 69f34845
Change-Id: I731cacb44cbf647942c57214671c49773091f1ab
DTI_PID/DTI_PID/ImportTextFromPDFDialog.py | ||
---|---|---|
98 | 98 |
for _file in self._dwgs: |
99 | 99 |
file_name = os.path.splitext(os.path.basename(_file))[0] |
100 | 100 |
matches = [id2_xml_file for id2_xml_file in id2_xml_files if id2_xml_file.replace(file_name, '').upper() == '.XML'] |
101 |
if not matches: |
|
102 |
path = os.path.join(temp_path, file_name + '.xml') |
|
103 |
img = AppDocData.my_imread(file_path=os.path.join(drawing_path, file_name + '.png')) |
|
104 |
_width = img.shape[1] |
|
105 |
_height = img.shape[0] |
|
106 |
xml, result = xg.write_to_xml(path, _width, _height, [], []) |
|
107 |
if xml: |
|
108 |
from xml.etree import ElementTree |
|
109 |
ElementTree.ElementTree(xml).write(path) |
|
110 |
matches = [file_name + '.xml'] |
|
101 | 111 |
if matches: |
102 | 112 |
try: |
103 | 113 |
id2_image_file = os.path.join(drawing_path, file_name + '.png') |
내보내기 Unified diff