Hallo Teepo,
Ein Batchfile in der Windows-Welt ist eigentlich nichts anderes wie ein Textfile in dem du Befehle einträgst die du im Prinzip nacheinander in die Eingabeaufforderung (cmd) von Windows hämmerst.
Für Standardaufgaben etc. wird das häufig verwendet. Im TC / NX Umfeld nimmt man auch gern Batchfiles um Umgebungsvariablen etc. zu setzen und dann Teamcenter oder NX zu starten.
Wie schon beschrieben gibt es die Möglichkeit NX auch ohne GUI zu starten. Eine gute Beschreibung findet sich hier in der NX-Doku.
Hier ein Auszug wie du das Programm run_managed verwendest. Das ganze funktioniert auch mit run_journal direkt mit einem nicht kompelierten Journal.
Zitat:
NX Open for .NET batch programs are standalone executables that you can run from the operating system, outside of NX. Batch applications must be .exe files.Typically .NET batch applications should have the following entry point:
public static void Main(string[] args)
However, Visual Studio will allow you to set any method as the applications entry point by setting the Entry Point property found under Project Properties → Linker → Advanced. If you used visual studio for creating batch applications, make sure your project is created as an console application.
Running a Batch Application
An NX Open application .exe file can be executed directly from a command line as any other executable. Since this is a managed application, you will need to do one of the following:
Copy the NX .NET libraries to your local working directory. To do so, copy all of the libraries from the %UGII_ROOT_DIR%\managed directory to your working directory. Use standard operating system command to execute the application.
Copy your .EXE to UGII_ROOT_DIR\managed. Use standard operating system command to execute the application.
Use run_managed.exe (%UGII_ROOT_DIR%\run_managed.exe)
run_managed
run_managed is a standalone executable that runs a managed NXOpen .EXE in the correct environment allowing it to pick up other DLLs from the install when they are not in the same directory as the .EXE itself.
usage:
run_managed <executable-file> <arguments>
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP