バッチファイルの作成

このタスクでは、モデル構築バッチファイルを作成します。

  1. 任意のテキストエディターを使って、以下の内容をテキストエディターにコピーし、名前をModel_build.batとします。
    REM Altair HyperMesh v2019
    REM Copyright (C)1990-2018 - Altair Engineering, Inc. All Rights Reserved.
    REM Contains trade secrets of Altair Engineering, Inc. Copyright notice does not imply publication.
    REM Decompilation or disassembly of this software is strictly prohibited.
    
    CLS
    @ECHO OFF
    pushd %~dp0
    set curr_dir=%~dp0
    
    REM Set below 4 Variables
    set ALTAIR_LICENSE_PATH=<License_File_Path>
    set input_plxml="%curr_dir%input_plmxml.xml"
    set output_plmxml="%curr_dir%output_plmxml.xml" 
    set rep_create={{Crash 5mm} {Crash 10mm}}
    set Install_Path=C:\Program Files\Altair\2019.0
    
    REM Do not change below this line
    set Log_File_name=log_%RANDOM%.log
    set log_file_path="%curr_dir%%Log_File_name%"
    
    set batch_exe_path="%Install_Path%\hm\bin\win64\hmbatch.exe"
    set batch_tcl_path="%Install_Path%\hm\scripts\br\views\modules\batch\script.tcl"
    ECHO .
    ECHO       
    ##################################################
    ##################################################
    ECHO       #                                                                                                    #
    ECHO       #                            Altair HyperMesh v2019                                                  #
    #
    ECHO       # Copyright (C)1990-2018 - Altair Engineering, Inc. All Rights Reserved.                            #
    ECHO       # Contains trade secrets of Altair Engineering, Inc. Copyright notice does not imply publication.  #
    ECHO       # Decompilation or disassembly of this software is strictly prohibited.                              #
    ECHO       #                                                                                                    #
    ECHO       
    #################################################
    #################################################
    
    %batch_exe_path% -tcl %batch_tcl_path% %input_plxml% -blSaveMonolithic 1 -
    blSaveToLibrary 0 -blSyncMetadataToPDM 0  -createRepresentations %rep_create% -
    exportFile %output_plmxml% -fileType UDMXML -logFile %log_file_path%
  2. set ALTAIR_LICENSE_PATH=<License_File_Path>の行で、該当するライセンスパスを入力します。
  3. set input_plxml="%curr_dir%input_plmxml.xml"の行で、該当するBOMファイル(PLMXMLファイル)の名前とパスを入力します。
  4. set output_plmxml="%curr_dir%output_plmxml.xml"の行で、該当する出力PLMXMLの名前とパスを入力します。
  5. set rep_create={{Crash 5mm} {Crash 10mm}}の行で、作成するリプリゼンテーションを指定します。
  6. set Install_Path=C:\Program Files\Altair\2019.0の行で、HyperMeshインストールパスを指定します。
    注: HyperMesh 2019以降のみがサポートされます。
  7. バッチファイルを保存します。
  8. コマンドプロンプトからバッチファイルを実行します。
    注: バッチファイルが実行されると、HyperMeshがバッチモードで開始され、指定どおりにリプリゼンテーションが作成されます。このプロセス中は、GUIが表示されません。