|
@@ -101,7 +101,7 @@ def createNewFileAndMove(newFil):
|
|
|
def myprocess(m, n):
|
|
|
positons = getarray.getAllPosition(m, n)
|
|
|
for positon in positons:
|
|
|
- indexAndPositionArray = getarray.getitemIndexAndPositionArray(positons[positon], m, n)
|
|
|
+ # indexAndPositionArray = getarray.getitemIndexAndPositionArray(positons[positon], m, n)
|
|
|
number = getarray.getitemIndexArrayNumber(positons[positon], m, n)
|
|
|
if (number == 1):
|
|
|
newFileName = _rootPath + "newfile" + str(positons[positon]) + ".dwg"
|
|
@@ -111,12 +111,16 @@ def myprocess(m, n):
|
|
|
# break
|
|
|
else:
|
|
|
moduleIndexs = getarray.getModuleIndex(positons[positon],m,n)
|
|
|
- for moduleIndex in moduleIndexs:
|
|
|
- newFileName = _rootPath + "newfile" + str(positons[positon]) + str(moduleIndex) + ".dwg"
|
|
|
- if(not os.path.exists(newFileName)):
|
|
|
- copyfile(_rootPath + _originFile, newFileName)
|
|
|
- moveMultipleTemplate(newFileName,positons[positon],moduleIndex)
|
|
|
+ if(GetAllModule.isWorkable(positons[positon])):
|
|
|
+ for moduleIndex in moduleIndexs:
|
|
|
+ newFileName = _rootPath + "newfile" + str(positons[positon]) + str(moduleIndex) + ".dwg"
|
|
|
+ if(not os.path.exists(newFileName)):
|
|
|
+ copyfile(_rootPath + _originFile, newFileName)
|
|
|
+ moveMultipleTemplate(newFileName,positons[positon],moduleIndex)
|
|
|
+ else:
|
|
|
+ print(positons[positon],"is not workable !!")
|
|
|
# break
|
|
|
+
|
|
|
def moveSingleTemplate(fileName,position):
|
|
|
# openFile(fileName)
|
|
|
GetAllModule.resetConfUsed()
|