개정판 8574e502
cad text
Change-Id: Ibf01aa7956c5e4128672a68b45825dd362afc483
DTI_PID/DTI_PID/ImportTextFromCADDialog.py | ||
---|---|---|
1139 | 1139 |
|
1140 | 1140 |
"""add text, line and symbol from autocad file to id2 xml file""" |
1141 | 1141 |
if 'Text' in will_be_converted_items: # text for attrdef |
1142 |
for record in autocad_xml_root.iter('AcDbText'): |
|
1143 |
if record.attrib['Layer'] not in exclude_layers: |
|
1144 |
node = self.text_to_xml(record) |
|
1145 |
if node: |
|
1146 |
textInfo.append(node) |
|
1142 |
for record in autocad_xml_root.iter('AcDbAttributeDefinition'): |
|
1143 |
for record in autocad_xml_root.iter('AcDbText'): |
|
1144 |
if record.attrib['Layer'] not in exclude_layers: |
|
1145 |
node = self.text_to_xml(record) |
|
1146 |
if node: |
|
1147 |
textInfo.append(node) |
|
1147 | 1148 |
|
1148 | 1149 |
for blk_tbl_record in autocad_xml_root.iter('AcDbBlockTableRecord'): |
1149 |
if blk_tbl_record.attrib['Name'].upper() != '*Model_Space'.upper(): |
|
1150 |
if blk_tbl_record.attrib['Name'].upper() != '*Model_Space'.upper() or \ |
|
1151 |
blk_tbl_record.attrib['Name'].upper().startswith('graphic+'.upper()): |
|
1150 | 1152 |
continue |
1151 | 1153 |
|
1152 | 1154 |
min_values = [float(token) for token in |
... | ... | |
1167 | 1169 |
self.offsets = [self.ui.spinBoxTextX.value(), self.ui.spinBoxTextY.value(), id2_bbox[5]] |
1168 | 1170 |
|
1169 | 1171 |
if 'Text' in will_be_converted_items: |
1170 |
pass |
|
1171 |
#for record in blk_tbl_record.iter('AcDbText'): |
|
1172 |
# if record.attrib['Layer'] not in exclude_layers: |
|
1173 |
# node = self.text_to_xml(record) |
|
1174 |
# if node: |
|
1175 |
# textInfo.append(node) |
|
1172 |
for record in blk_tbl_record.iter('AcDbText'): |
|
1173 |
if record.attrib['Layer'] not in exclude_layers: |
|
1174 |
node = self.text_to_xml(record) |
|
1175 |
if node: |
|
1176 |
textInfo.append(node) |
|
1176 | 1177 |
|
1177 | 1178 |
#for record in blk_tbl_record.iter('AcDbAttribute'): |
1178 | 1179 |
# if record.attrib['Layer'] not in exclude_layers: |
내보내기 Unified diff