개정판 213a6fa4
graphic
Change-Id: I4303f618ecc56d09e7c4d83080fac762c7ea5b4f
DTI_PID/DTI_PID/XmlGenerator.py | ||
---|---|---|
16 | 16 |
|
17 | 17 |
SYMBOL_LIST_NODE_NAME = "SYMBOLS" |
18 | 18 |
TEXT_INFO_LIST_NODE_NAME = "TEXTINFOS" |
19 |
IMG_LINE_LIST_NODE_NAME = "IMGLINES" |
|
19 |
#IMG_LINE_LIST_NODE_NAME = "IMGLINES"
|
|
20 | 20 |
NOTE_TEXT_INFO_LIST_NOTE_NAME = "NOTES" |
21 | 21 |
|
22 | 22 |
SCATEGORY_NODE_NAME = "SYMBOL" |
... | ... | |
71 | 71 |
|
72 | 72 |
UNKNOWNS_NODE_NAME = "UNKNOWNS" |
73 | 73 |
VENDOR_NODE_NAME = "VENDORS" |
74 |
|
|
75 |
GRAPHIC_NODE_NAME = "GRAPHICS" |
|
74 | 76 |
# END_BREAK = "END_BREAKS" |
75 | 77 |
|
76 | 78 |
''' |
... | ... | |
78 | 80 |
@author |
79 | 81 |
@date |
80 | 82 |
@history 2018.05.25 Jeongwoo Remove parameter 'imgLineList' |
83 |
no more used |
|
81 | 84 |
''' |
82 |
|
|
83 |
|
|
84 | 85 |
def writeXml(pidName, pidWidth, pidHeight, searchedSymbolList, textInfoList, noteTextInfoList): |
85 | 86 |
path = os.path.join(AppDocData.instance().getCurrentProject().getTempPath(), pidName + '.xml') |
86 | 87 |
try: |
... | ... | |
103 | 104 |
@author humkyung |
104 | 105 |
@date 2018.04.23 |
105 | 106 |
''' |
106 |
|
|
107 |
|
|
108 | 107 |
def writeOutputXml(pidName, pidWidth, pidHeight): |
109 | 108 |
try: |
110 | 109 |
path = os.path.join(AppDocData.instance().getCurrentProject().getOutputPath(), pidName + '.xml') |
... | ... | |
132 | 131 |
humkyung 2018.05.16 remove code to write orphan lines and symbols |
133 | 132 |
humkyung 2018.09.06 write text to xml |
134 | 133 |
''' |
135 |
|
|
136 |
|
|
137 | 134 |
def generateOutputXml(pidName, pidWidth, pidHeight): |
138 | 135 |
appDocData = AppDocData.instance() |
139 | 136 |
|
... | ... | |
168 | 165 |
''' |
169 | 166 |
@history 2018.04.30 Jeongwoo noteTextInfoList None Check |
170 | 167 |
2018.05.25 Jeongwoo Remove parameter 'imgLineList' and Check if variable is None or not |
168 |
no more used |
|
171 | 169 |
''' |
172 |
|
|
173 |
|
|
174 | 170 |
def generateXml(pidName, pidWidth, pidHeight, searchedSymbolList, textInfoList, noteTextInfoList): |
175 | 171 |
xml = Element(ROOT_NODE_NAME) # Root Node |
176 | 172 |
SubElement(xml, ROOT_DWGNAME_NODE_NAME).text = pidName |
... | ... | |
365 | 361 |
@brief Append LineInfo Data |
366 | 362 |
@author Jeongwoo |
367 | 363 |
@date 2018.05.28 |
364 |
no more used |
|
368 | 365 |
''' |
369 | 366 |
def appendLineInfo(xmlPath, lineInfo): |
370 | 367 |
tree = parse(xmlPath) |
... | ... | |
427 | 424 |
lineNoListNode = Element(LINE_NOS_NODE_NAME) |
428 | 425 |
unknownListNode = Element(UNKNOWNS_NODE_NAME) |
429 | 426 |
vendorListNode = Element(VENDOR_NODE_NAME) |
427 |
graphicListNode = Element(GRAPHIC_NODE_NAME) |
|
430 | 428 |
|
431 | 429 |
node_dictionary = {SymbolSvgItem: symbolListNode, QEngineeringTextItem: textInfoListNode, |
432 | 430 |
QEngineeringNoteItem: noteTextInfoListNode, |
... | ... | |
493 | 491 |
xml.append(unknownListNode) |
494 | 492 |
xml.append(trimLineNoListNode) |
495 | 493 |
xml.append(vendorListNode) |
494 |
xml.append(graphicListNode) |
|
496 | 495 |
#ElementTree(xml).write(path) |
497 | 496 |
except Exception as ex: |
498 | 497 |
from App import App |
내보내기 Unified diff