erste Compare Rumpf Routine impl.

This commit is contained in:
2023-10-19 17:28:47 +02:00
parent a1d8102774
commit 4efff81666
5 changed files with 60 additions and 47 deletions
+2 -3
View File
@@ -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:
1. Bestandsliste ableiten aus Rule Designer (was ist schon da)
2. BG-Stückliste aus SIVAS ableiten mit dem JSON/CSV-Export Tool
(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 ( BG-Stücklisten Excel)
2. Baugruppen-Stückliste aus SIVAS ableiten mit dem JSON/CSV-Export Tool. Vorteil: Man bekommt alle Unterbaugruppen der Baugruppe mit aufgelistet.
3. Vorlagen-Excel für Baugruppenvergleich kopieren und auf aktuellen Fall verknüpfen (Baugruppen-Stücklisten Excel)
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)
6. Excel zur Impfung der 3D-Datensätze öffnen.
@@ -1,3 +1,5 @@
@echo off
call cremig_setenv.bat
python %CREMIG_LIB%\update_database.py --rd
pause
@@ -1,5 +1,5 @@
call cremig_setenv.bat
@echo off
call cremig_setenv.bat
if "%1" == "-s" (set SIVAS_ID=%2) else (set /p SIVAS_ID=Enter Sivas ID:)
python %CREMIG_LIB%\update_database.py --sivas=%SIVAS_ID%
+6
View File
@@ -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
View File
@@ -11,19 +11,7 @@ Dieses Programm holt sich aus
- Sivas eine Liste der gewünschten Teile
"""
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"
def get_rd_database(inPath, outDir, outFileName):
if os.path.isfile(inPath):
outFilePath = os.path.join(outDir, outFileName)
@@ -35,21 +23,39 @@ if __name__ == '__main__':
else:
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')
sivasId = str(args.sivas)
def get_sivas_databse(exePath, sivasId, outFilePath):
if os.path.isfile(exePath):
outFilePath = os.path.join(outDir, sivasId + ".json")
if os.path.isdir(outDir):
#subprocess.Popen([exePath, "-o", outDir, "--format json", "-number", sivasId ])
cmd = ' '.join([exePath, "-o", outDir, "--format json", "-number", sivasId ])
os.system(cmd)
else:
print(f"no such executable ${outDir} of env CREMIG_DATA")
if os.path.isfile(outFilePath):
print("done")
else:
print("failure - did not get .json file")
else:
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)