I will look at this evening.
BV
BV
f = open('data_file') idDict = {1:1000,2:1100,3:1150,4:5000} pntDict = { 1:5000,2:5100,3:5200,4:5003,5:6000,6:6500,7:9000,8 :7877,9:4500} outList = [] for line in f: if line.startswith('Rect') or line.startswith('Tria'): target = line[8:16] if int(target) in idDict.keys(): line = ('%-8s' % idDict[int(target)]).join([line[0:8], line[16:]]) if line.startswith('Pnt'): target = line[8:16] if int(target) in pntDict.keys(): line = ('%-8s' % pntDict[int(target)]).join([line[0:8], line[16:]]) outList.append(line) f.close() print ''.join(outList)
>>> $$$$$$$$$$$$$$$$$$$$$$ Rect 1000 1 2 7 6 Rect 1100 2 3 8 7 Rect 1150 3 4 9 8 Tria 5000 4 5 9 Pnt 5000 0. 0. 0. Pnt 5100 5. 0. 0. Pnt 5200 10. 0. 0. Pnt 5003 15. 0. 0. Pnt 6000 20. 0. 0. Pnt 6500 0. 5. 0. Pnt 9000 5. 5. 0. Pnt 7877 10. 5. 0. Pnt 4500 15. 5. 0. $$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$ >>> >>>
SAmpleInputData $$$$$ START COLOR RED LINETYPE SOLID END $$$$$$$ PLine 1 6 1.5 9.375 .001 .001 $ Line Details Line* 1 1 1 2 * .002952 .992547 .121827 $ Rect 2 1 2 3 7 6 Rect 3 1 3 4 8 7 PRect* 4 11 15 16 * 10 11 0.3 Rect* 4 1 5 6 * 10 11 0. Othr* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 Oth1* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 * 10 11 0. 1.0 * 10 11 0. 1.0 Rect* 5 1 5 6 * 10 11 0. Rect 10000000 10000000200000007000000060000000 Rect 20000000 20000000300000008000000070000000 Rect 30000000 30000000400000009000000080000000 Tria 40000000 400000005000000090000000 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ Tria 6 1 7 2 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Point 1 0.0 0.0 0.0 Point 2 1.0 0.0 0.0 Point 3 2.0 0.0 0.0 Point 4 3.0 0.0 0.0 Point 5 0.0 1.0 0.0 Point 6 1.0 1.0 0.0 Point 7 2.0 1.0 0.0 Point 8 4.0 1.0 0.0 Point* 9 0.0 2.0 * 0.0 Point *3280504 0 1.28286145E+03 1.28286145E+03 * -2.01004501E+02 Point *3280505 0 1.28286145-03 1.28286145+03 * -2.01004501+02 Point 10000000 0. 0. 0. Point 20000000 5. 0. 0. Point 30000000 10. 0. 0. Point 40000000 15. 0. 0. Point 50000000 20. 0. 0. Point 60000000 0. 5. 0. Point 70000000 5. 5. 0. Point 80000000 10. 5. 0. Point 90000000 15. 5. 0. $ END
3-Cases Portion of the InputData: ----------------------- PLine 1 6 1.5 9.375 .001 .001 Line 1 1 1 2 Rect 2 1 1 2 3 4 PRect* 3 4 3 1 * 10 11 0.3 Rect* 3 1 4 3 * 2 1 0. $$$ Point 1 0.0 0.0 0.0 Point 2 1.0 0.0 0.0 Point* 3 0.0 2.0 * 0.0 Point *4 0 1.28286145E+03 1.28286145E+03 * -2.01004501E+02 OutputData for 3-Cases: --------------------- Case-1( Only PointIDs has to be replaced): ---------------------------------------------- START COLOR RED LINETYPE SOLID END PLine 1 6 1.5 9.375 .001 .001 Line 1 1 8601010186010102 Rect 2 1 860101018601010286010103860101004 PRect* 3 4 3 1 * 10 11 0.3 Rect* 3 1 86010104 86010103 * 86010102 86010101 0. Othr* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 Oth1* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 * 10 11 0. 1.0 * 10 11 0. 1.0 Point 86010101 0.0 0.0 0.0 Point 86010102 1.0 0.0 0.0 Point* 86010103 0.0 2.0 * 0.0 Point *86010104 0 1.28286145E+03 1.28286145E+03 * -2.01004501E+02 Case- 2( Only CurveIDs has to be replaced): ---------------------------------------------- START COLOR RED LINETYPE SOLID END PLine 90010101 6 1.5 9.375 .001 .001 Line 90010102 1 1 2 Rect 90010103 1 1 2 3 4 PRect* 90010104 4 3 1 * 10 11 0.3 Rect* 90010104 1 4 3 * 2 1 0. Othr* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 Oth1* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 * 10 11 0. 1.0 * 10 11 0. 1.0 Point 1 0.0 0.0 0.0 Point 2 1.0 0.0 0.0 Point* 3 0.0 2.0 * 0.0 Point *4 0 1.28286145E+03 1.28286145E+03 * -2.01004501E+02 Case-3(Both Point and Curve IDs has to be replaced): ---------------------------------------------- START COLOR RED LINETYPE SOLID END PLine 90010101 6 1.5 9.375 .001 .001 Line 90010102 1 8601010186010102 Rect 90010103 1 860101018601010286010103860101004 PRect* 90010104 4 3 1 * 10 11 0.3 Rect* 90010104 1 86010104 86010103 * 86010102 86010101 0. Othr* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 Oth1* 1 1 5 6 * 10 11 0. 0. * 10 11 0. 1.0 * 10 11 0. 1.0 * 10 11 0. 1.0 Point 86010101 0.0 0.0 0.0 Point 86010102 1.0 0.0 0.0 Point* 86010103 0.0 2.0 * 0.0 Point *86010104 0 1.28286145E+03 1.28286145E+03 * -2.01004501E+02
SampleCode def write_new_pointID_to_file_for_small_format(strLine,pointID): # Change the Values line = ('%-8s' % pointID).join([strLine[0:8], strLine[16:]]) return line def write_new_pointID_to_file_for_large_format(strLine,pointID): # Change the Values line = ('%-16s' % pointID).join([strLine[0:8], strLine[24:]]) return line def write_new_curveID_to_file_for_small_format(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) if newCurveIdPointIDDict: line = ('%-8s' % curvetID).join([strLine[0:8], strLine[16:24]]) for i in range(0,len(newPointList)): newPointID = newPointList[i] if newPointID: strNewPointID = strNewPointID + '%-8d' %newPointID line = strNewPointID.join([line[0:24],line[24:]]) else: #Property line = ('%-8s' % curvetID).join([strLine[0:8], strLine[16:]]) return line def write_new_curveID_to_file_for_large_format(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) if newCurveIdPointIDDict: line = ('%-16s' % curvetID).join([strLine[0:8], strLine[24:40]]) pointList = newPointList [:2] # Only two elements for i in range(0,len(pointList)): newPointID = pointList[i] if newPointID: strNewPointID = strNewPointID + '%-16d' %newPointID line = strNewPointID.join([line[0:72],line[72:]]) else: line = ('%-16s' % curvetID).join([strLine[0:8], strLine[24:]]) return line def write_new_curveID_to_file_for_large_format_second_line(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) line = strLine #line = ('%-8s' % *).join([strLine[0:8], strLine[40:]]) pointList = newPointList [2:] # Only two elements for i in range(0,len(pointList)): newPointID = pointList[i] if newPointID: strNewPointID = strNewPointID + '%-16d' %newPointID line = strNewPointID.join([line[0:8],line[40:]]) return line def write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict): fText = open(strFileName,'w') # True - Large Format # False - Small Format bLargeFormatFlag = True curvetID = 0 bPropCardFlag = False bPropCardLargeFlag = False bCurveCardFlag = False bPointCardFlag = False bOtherDetailsFlag = False bCurveLargeFormat = False bPointLargeFormat = False b1DCurveFlag = False pointFlag = True curveFlag = True dataList = pointIDMapDict.keys() for i in range(0,len(dataList)): if len(str(pointIDMapDict.get(dataList[i]))) > 8: pointFlag = False break else: pointFlag = True dataList = curveIDMapDict.keys() for i in range(0,len(dataList)): if len(str(curveIDMapDict.get(dataList[i]))) > 8: curveFlag = False break else: curveFlag = True if pointFlag and curveFlag : for line in listStrLine: if line.startswith('Point')and line[:8].strip().isalpha(): target = line[8:16] if int(target) in pointIDMapDict.keys(): newPointID = pointIDMapDict[int(target)] line = write_new_pointID_to_file_for_small_format(line,newPointID) bPointCardFlag = True bCurveLargeFormat = False elif (line.startswith('Point*') or line.startswith('Point *')): #Large field format (say 16) target = int(line[8:24]) if int(target) in pointIDMapDict.keys(): newPointID = pointIDMapDict[int(target)] line = write_new_pointID_to_file_for_large_format(line,newPointID) bPointCardFlag = True bPointLargeFormat = True bCurveLargeFormat = False elif line.startswith('*') and bPointLargeFormat: bPointCardFlag = True bPointLargeFormat = False # For Elements elif(line.startswith('Rect ')or \ line.startswith('Tria ') or \ line.startswith('Line') and line[:8].strip().isalpha() ): target = line[8:16] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_small_format(line,newCurveID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = False bPointLargeFormat = False elif(line.startswith('PLine') and line[:8].strip().isalpha() or\ line.startswith('PRect') and line[:8].strip().isalpha() ): target = line[8:16] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] dataDict = {} line = write_new_curveID_to_file_for_small_format(line,newCurveID,dataDict) bPropCardFlag = True bPointLargeFormat = False elif (line.startswith('Rect*') or \ line.startswith('Tria*') or \ line.startswith('Line*')): target = line[8:24] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_large_format(line,newCurveID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = True curvetID = newCurveID bPointLargeFormat = False if line.startswith('Line*'): b1DCurveFlag = True else: b1DCurveFlag = False elif line.startswith('*') and bCurveLargeFormat : if not b1DCurveFlag: bCurveCardFlag = True line = write_new_curveID_to_file_for_large_format_second_line(line,curvetID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = False elif(line.startswith('PLine*') or\ line.startswith('PRect*') ): target = line[8:24] dataDict = {} if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_large_format(line,newCurveID,dataDict) bPropCardFlag = True bPropCardLargeFlag = True bCurveLargeFormat = False elif line.startswith('*') and bPropCardLargeFlag: bPropCardFlag = True bPropCardLargeFlag = False else: #if line.startswith('$') or line.startswith('*') : if line.startswith('$') : bOtherDetailsFlag = False else: # Header and Footer ,comments bOtherDetailsFlag = True b1DCurveFlag = False if bPropCardFlag or bCurveCardFlag or bPointCardFlag or bOtherDetailsFlag or b1DCurveFlag : fText.write(line.strip()) fText.write('\n') bPropCardFlag = False bCurveCardFlag = False bPointCardFlag = False bOtherDetailsFlag = False #b1DCurveFlag = False fText.close() if __name__ == '__main__': listStrLine =[] strFileName = 'C:\\Sample3_Mod.txt' f= open('C\\Sample3.txt','r') strTemp = f.readlines() for line in strTemp: #Appending all the string data of BDF file.Needed this data for writing the Modified BDF file listStrLine.append(line) pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[86010101,86010102],10001102:[86010102,86010103,86010110,96010104],10001103:[86010103,86010104,86010201,86010110],10001104:[86010106,96010104,86010115,96010403],10001106:[96010104,86010115,96010403]} write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict)
Othercases if __name__ == '__main__': listStrLine =[] strFileName = 'C:\\Sample3_Mod.txt' f= open('C:\\Sample3.txt','r') strTemp = f.readlines() for line in strTemp: listStrLine.append(line) iCount = 2 #Case-3 if iCount==3: pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[86010101,86010102],10001102:[86010102,86010103,86010110,96010104],10001103:[86010103,86010104,86010201,86010110],10001104:[86010106,96010104,86010115,96010403],10001106:[96010104,86010115,96010403]} elif iCount==1: #Case-1 pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:1,2:2,3:3,4:4,6:6} newCurveIdPointIDDict = {1:[86010101,86010102],2:[86010102,86010103,86010110,96010104],3:[86010103,86010104,86010201,86010110],4:[86010106,96010104,86010115,96010403],6:[96010104,86010115,96010403]} elif iCount==2: #Case-2 #pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} pointIDMapDict = {1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,3280504:3280504} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[1,2],10001102:[2,3,7,5],10001103:[3,4,8,7],10001104:[5,6,9,3280504],10001106:[6,9,3280504]} write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict)
SampleCode def write_new_pointID_to_file_for_small_format(strLine,pointID): # Change the Values line = ('%-8s' % pointID).join([strLine[0:8], strLine[16:]]) return line def write_new_pointID_to_file_for_large_format(strLine,pointID): # Change the Values line = ('%-16s' % pointID).join([strLine[0:8], strLine[24:]]) return line def write_new_curveID_to_file_for_small_format(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) if newCurveIdPointIDDict: line = ('%-8s' % curvetID).join([strLine[0:8], strLine[16:24]]) for i in range(0,len(newPointList)): newPointID = newPointList[i] if newPointID: strNewPointID = strNewPointID + '%-8d' %newPointID line = strNewPointID.join([line[0:24],line[24:]]) else: #Property line = ('%-8s' % curvetID).join([strLine[0:8], strLine[16:]]) return line def write_new_curveID_to_file_for_large_format(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) if newCurveIdPointIDDict: line = ('%-16s' % curvetID).join([strLine[0:8], strLine[24:40]]) pointList = newPointList [:2] # Only two elements for i in range(0,len(pointList)): newPointID = pointList[i] if newPointID: strNewPointID = strNewPointID + '%-16d' %newPointID line = strNewPointID.join([line[0:72],line[72:]]) else: line = ('%-16s' % curvetID).join([strLine[0:8], strLine[24:]]) return line def write_new_curveID_to_file_for_large_format_second_line(strLine,curvetID,newCurveIdPointIDDict): # Currently supports for 8 digit field strNewPointID = '' newPointList = newCurveIdPointIDDict.get(curvetID) line = strLine #line = ('%-8s' % *).join([strLine[0:8], strLine[40:]]) pointList = newPointList [2:] # Only two elements for i in range(0,len(pointList)): newPointID = pointList[i] if newPointID: strNewPointID = strNewPointID + '%-16d' %newPointID line = strNewPointID.join([line[0:8],line[40:]]) return line def write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict): fText = open(strFileName,'w') # True - Large Format # False - Small Format bLargeFormatFlag = True curvetID = 0 bPropCardFlag = False bPropCardLargeFlag = False bCurveCardFlag = False bPointCardFlag = False bOtherDetailsFlag = False bCurveLargeFormat = False bPointLargeFormat = False b1DCurveFlag = False pointFlag = True curveFlag = True dataList = pointIDMapDict.keys() for i in range(0,len(dataList)): if len(str(pointIDMapDict.get(dataList[i]))) > 8: pointFlag = False break else: pointFlag = True dataList = curveIDMapDict.keys() for i in range(0,len(dataList)): if len(str(curveIDMapDict.get(dataList[i]))) > 8: curveFlag = False break else: curveFlag = True if pointFlag and curveFlag : for line in listStrLine: if line.startswith('Point')and line[:8].strip().isalpha(): target = line[8:16] if int(target) in pointIDMapDict.keys(): newPointID = pointIDMapDict[int(target)] line = write_new_pointID_to_file_for_small_format(line,newPointID) bPointCardFlag = True bCurveLargeFormat = False elif (line.startswith('Point*') or line.startswith('Point *')): #Large field format (say 16) target = int(line[8:24]) if int(target) in pointIDMapDict.keys(): newPointID = pointIDMapDict[int(target)] line = write_new_pointID_to_file_for_large_format(line,newPointID) bPointCardFlag = True bPointLargeFormat = True bCurveLargeFormat = False elif line.startswith('*') and bPointLargeFormat: bPointCardFlag = True bPointLargeFormat = False # For Elements elif(line.startswith('Rect ')or \ line.startswith('Tria ') or \ line.startswith('Line') and line[:8].strip().isalpha() ): target = line[8:16] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_small_format(line,newCurveID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = False bPointLargeFormat = False elif(line.startswith('PLine') and line[:8].strip().isalpha() or\ line.startswith('PRect') and line[:8].strip().isalpha() ): target = line[8:16] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] dataDict = {} line = write_new_curveID_to_file_for_small_format(line,newCurveID,dataDict) bPropCardFlag = True bPointLargeFormat = False elif (line.startswith('Rect*') or \ line.startswith('Tria*') or \ line.startswith('Line*')): target = line[8:24] if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_large_format(line,newCurveID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = True curvetID = newCurveID bPointLargeFormat = False if line.startswith('Line*'): b1DCurveFlag = True else: b1DCurveFlag = False elif line.startswith('*') and bCurveLargeFormat : if not b1DCurveFlag: bCurveCardFlag = True line = write_new_curveID_to_file_for_large_format_second_line(line,curvetID,newCurveIdPointIDDict) bCurveCardFlag = True bCurveLargeFormat = False elif(line.startswith('PLine*') or\ line.startswith('PRect*') ): target = line[8:24] dataDict = {} if int(target) in curveIDMapDict.keys(): newCurveID = curveIDMapDict[int(target)] line = write_new_curveID_to_file_for_large_format(line,newCurveID,dataDict) bPropCardFlag = True bPropCardLargeFlag = True bCurveLargeFormat = False elif line.startswith('*') and bPropCardLargeFlag: bPropCardFlag = True bPropCardLargeFlag = False else: #if line.startswith('$') or line.startswith('*') : if line.startswith('$') : bOtherDetailsFlag = False else: # Header and Footer ,comments bOtherDetailsFlag = True b1DCurveFlag = False if bPropCardFlag or bCurveCardFlag or bPointCardFlag or bOtherDetailsFlag or b1DCurveFlag : fText.write(line.strip()) fText.write('\n') bPropCardFlag = False bCurveCardFlag = False bPointCardFlag = False bOtherDetailsFlag = False #b1DCurveFlag = False fText.close() if __name__ == '__main__': listStrLine =[] strFileName = 'C:\\Sample3_Mod.txt' f= open('C\\Sample3.txt','r') strTemp = f.readlines() for line in strTemp: listStrLine.append(line) pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[86010101,86010102],10001102:[86010102,86010103,86010110,96010104],10001103:[86010103,86010104,86010201,86010110],10001104:[86010106,96010104,86010115,96010403],10001106:[96010104,86010115,96010403]} write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict)
Othercases if __name__ == '__main__': listStrLine =[] strFileName = 'C:\\Sample3_Mod.txt' f= open('C:\\Sample3.txt','r') strTemp = f.readlines() for line in strTemp: listStrLine.append(line) iCount = 2 #Case-3 if iCount==3: pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[86010101,86010102],10001102:[86010102,86010103,86010110,96010104],10001103:[86010103,86010104,86010201,86010110],10001104:[86010106,96010104,86010115,96010403],10001106:[96010104,86010115,96010403]} elif iCount==1: #Case-1 pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} curveIDMapDict = {1:1,2:2,3:3,4:4,6:6} newCurveIdPointIDDict = {1:[86010101,86010102],2:[86010102,86010103,86010110,96010104],3:[86010103,86010104,86010201,86010110],4:[86010106,96010104,86010115,96010403],6:[96010104,86010115,96010403]} elif iCount==2: #Case-2 #pointIDMapDict = {1:86010101,2:86010102,3:86010103,4:86010104,5:86010106,6:96010104,7:86010110,8:86010201,9:86010115,3280504:96010403} pointIDMapDict = {1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,3280504:3280504} curveIDMapDict = {1:10001101,2:10001102,3:10001103,4:10001104,6:10001106} newCurveIdPointIDDict = {10001101:[1,2],10001102:[2,3,7,5],10001103:[3,4,8,7],10001104:[5,6,9,3280504],10001106:[6,9,3280504]} write_data_file(strFileName,listStrLine,pointIDMapDict,curveIDMapDict,newCurveIdPointIDDict)
Comment