개정판 6b6f604f
cad symbol regx test
Change-Id: Id03c9bafb7f94e2bd3c987402358991aa476bb6f
DTI_PID/DTI_PID/ImportTextFromCADDialog.py | ||
---|---|---|
12 | 12 |
from xml.etree.ElementTree import Element, SubElement, dump, ElementTree, parse |
13 | 13 |
from SymbolRegiDataListDialog import QSymbolRegiDataListDialog |
14 | 14 |
import uuid |
15 |
import re |
|
15 | 16 |
from Drawing import Drawing |
16 | 17 |
|
17 | 18 |
import ImportTextFromCAD_UI |
... | ... | |
1565 | 1566 |
if name in config.value.split(','): |
1566 | 1567 |
uid = config.key |
1567 | 1568 |
break |
1569 |
|
|
1570 |
for _mapping in config.value.split(','): |
|
1571 |
match = re.search(_mapping, name, re.DOTALL) |
|
1572 |
if match and match.start() is 0 and match.end() is len(name): |
|
1573 |
uid = config.key |
|
1574 |
break |
|
1575 |
|
|
1568 | 1576 |
if uid: |
1569 | 1577 |
app_doc_data = AppDocData.instance() |
1570 | 1578 |
symbol = app_doc_data.getSymbolByQuery('UID', uid) |
minorTools/xmlTextSearcher.py | ||
---|---|---|
3 | 3 |
def finder(): |
4 | 4 |
print("finder start") |
5 | 5 |
|
6 |
targetText = ['>Interlock(1)<']
|
|
7 |
path = 'W:\ID2_Project\Eurochem\Temp'
|
|
6 |
targetText = ['>LPS-0007-HB4-40']
|
|
7 |
path = 'W:\\CARBONCO\\drawings\\Native'
|
|
8 | 8 |
|
9 | 9 |
print("target : " + str(len(targetText))) |
10 | 10 |
print("path : " + path) |
내보내기 Unified diff