erste Compare Rumpf Routine impl.
This commit is contained in:
@@ -7,9 +7,8 @@ Ziel: Alte 3D-Daten aus Creo mit aktuellen SIVAS-Informationen in neuer Konstruk
|
|||||||
Die folgenden Schritte müssen vom Entwickler aktuell beschritten werden:
|
Die folgenden Schritte müssen vom Entwickler aktuell beschritten werden:
|
||||||
|
|
||||||
1. Bestandsliste ableiten aus Rule Designer (was ist schon da)
|
1. Bestandsliste ableiten aus Rule Designer (was ist schon da)
|
||||||
2. BG-Stückliste aus SIVAS ableiten mit dem JSON/CSV-Export Tool
|
2. Baugruppen-Stückliste aus SIVAS ableiten mit dem JSON/CSV-Export Tool. Vorteil: Man bekommt alle Unterbaugruppen der Baugruppe mit aufgelistet.
|
||||||
(wurde wiederverwendet, war schon mal programmiert) Vorteil man bekommt alle Unterbaugruppe mit aufgelistet.
|
3. Vorlagen-Excel für Baugruppenvergleich kopieren und auf aktuellen Fall verknüpfen (Baugruppen-Stücklisten Excel)
|
||||||
3. Vorlagen-Excel für Baugruppenvergleich kopieren und auf aktuellen Fall verknüpfen ( BG-Stücklisten Excel)
|
|
||||||
4. Aufwandsabschätzung durchführen (Neuaufbau, Halbzeugbearbeitung usw.)
|
4. Aufwandsabschätzung durchführen (Neuaufbau, Halbzeugbearbeitung usw.)
|
||||||
5. Einzelteil-Informationen aus SIVAS in Tabellenform ableiten und als Excel speichern (hierfür die zusätzlichen Spalten vom Jakob)
|
5. Einzelteil-Informationen aus SIVAS in Tabellenform ableiten und als Excel speichern (hierfür die zusätzlichen Spalten vom Jakob)
|
||||||
6. Excel zur Impfung der 3D-Datensätze öffnen.
|
6. Excel zur Impfung der 3D-Datensätze öffnen.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@echo off
|
||||||
call cremig_setenv.bat
|
call cremig_setenv.bat
|
||||||
|
|
||||||
python %CREMIG_LIB%\update_database.py --rd
|
python %CREMIG_LIB%\update_database.py --rd
|
||||||
pause
|
pause
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
call cremig_setenv.bat
|
|
||||||
@echo off
|
@echo off
|
||||||
|
call cremig_setenv.bat
|
||||||
if "%1" == "-s" (set SIVAS_ID=%2) else (set /p SIVAS_ID=Enter Sivas ID:)
|
if "%1" == "-s" (set SIVAS_ID=%2) else (set /p SIVAS_ID=Enter Sivas ID:)
|
||||||
|
|
||||||
python %CREMIG_LIB%\update_database.py --sivas=%SIVAS_ID%
|
python %CREMIG_LIB%\update_database.py --sivas=%SIVAS_ID%
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
call cremig_setenv.bat
|
||||||
|
@echo off
|
||||||
|
if "%1" == "-s" (set SIVAS_ID=%2) else (set /p SIVAS_ID=Enter Sivas ID:)
|
||||||
|
|
||||||
|
python %CREMIG_LIB%\compare_lists.py --sivas=%SIVAS_ID%
|
||||||
|
pause
|
||||||
+24
-18
@@ -11,19 +11,7 @@ Dieses Programm holt sich aus
|
|||||||
- Sivas eine Liste der gewünschten Teile
|
- Sivas eine Liste der gewünschten Teile
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
def get_rd_database(inPath, outDir, outFileName):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser(description='fetches data from sivas or ruledesigner fusion', prog='update_database')
|
|
||||||
parser.add_argument('-s', '--sivas', action='store', help='fetch data of this id from sivas fo local database folder')
|
|
||||||
parser.add_argument('-r', '--rd', action='store_true', help='fetch list of existing parts from RD Fusion')
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
outDir = os.environ.get('CREMIG_DATA')
|
|
||||||
if args.rd:
|
|
||||||
inPath = os.environ.get('RD_DATABASE_SOURCE')
|
|
||||||
outFileName = "RD_Bestandspool.csv"
|
|
||||||
if os.path.isfile(inPath):
|
if os.path.isfile(inPath):
|
||||||
|
|
||||||
outFilePath = os.path.join(outDir, outFileName)
|
outFilePath = os.path.join(outDir, outFileName)
|
||||||
@@ -35,21 +23,39 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
print(f"no such file ${inPath} of environment variable RD_DATABASE_SOURCE. have a look at cremig_setenv.bat")
|
print(f"no such file ${inPath} of environment variable RD_DATABASE_SOURCE. have a look at cremig_setenv.bat")
|
||||||
|
|
||||||
if args.sivas:
|
|
||||||
exePath = os.environ.get('SIVAS_DATABASE_QUERY')
|
def get_sivas_databse(exePath, sivasId, outFilePath):
|
||||||
sivasId = str(args.sivas)
|
|
||||||
if os.path.isfile(exePath):
|
if os.path.isfile(exePath):
|
||||||
outFilePath = os.path.join(outDir, sivasId + ".json")
|
|
||||||
if os.path.isdir(outDir):
|
if os.path.isdir(outDir):
|
||||||
#subprocess.Popen([exePath, "-o", outDir, "--format json", "-number", sivasId ])
|
#subprocess.Popen([exePath, "-o", outDir, "--format json", "-number", sivasId ])
|
||||||
cmd = ' '.join([exePath, "-o", outDir, "--format json", "-number", sivasId ])
|
cmd = ' '.join([exePath, "-o", outDir, "--format json", "-number", sivasId ])
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
else:
|
else:
|
||||||
print(f"no such executable ${outDir} of env CREMIG_DATA")
|
print(f"no such executable ${outDir} of env CREMIG_DATA")
|
||||||
|
if os.path.isfile(outFilePath):
|
||||||
print("done")
|
print("done")
|
||||||
|
else:
|
||||||
|
print("failure - did not get .json file")
|
||||||
else:
|
else:
|
||||||
print(f"no such file ${exePath} of environment variable SIVAS_DATABASE_QUERY. have a look at cremig_setenv.bat")
|
print(f"no such file ${exePath} of environment variable SIVAS_DATABASE_QUERY. have a look at cremig_setenv.bat")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser(description='fetches data from sivas or ruledesigner fusion', prog='update_database')
|
||||||
|
parser.add_argument('-s', '--sivas', action='store', help='fetch data of this id from sivas fo local database folder')
|
||||||
|
parser.add_argument('-r', '--rd', action='store_true', help='fetch list of existing parts from network drive')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
outDir = os.environ.get('CREMIG_DATA')
|
||||||
|
if args.rd:
|
||||||
|
inPath = os.environ.get('RD_DATABASE_SOURCE')
|
||||||
|
outFileName = "RD_Bestandspool.csv"
|
||||||
|
get_rd_database(inPath, outDir, outFileName)
|
||||||
|
|
||||||
|
|
||||||
|
if args.sivas:
|
||||||
|
exePath = os.environ.get('SIVAS_DATABASE_QUERY')
|
||||||
|
sivasId = str(args.sivas)
|
||||||
|
outFilePath = os.path.join(outDir, sivasId + ".json")
|
||||||
|
get_sivas_databse(exePath, sivasId, outFilePath)
|
||||||
|
|||||||
Reference in New Issue
Block a user