入门

为了方便地使用阿姆斯特丹建模套件的脚本工具,您需要设置一些shell 环境变量 and add the adf. BIN folder to your PATH. This can be done by sourcing file adfbashrc.sh, which is located in the Amsterdam Modeling Suite installation directory.

Linux.

注意:如果您跟随了 Linux. QuickStart安装指南, the adfbashrc.sh should be automatically sourced when you start up a new terminal, and you can ignore the following steps.

  • 启动终端

  • Source the adfbashrc.sh with the following command (note: you should replace path_to_installation_directory with the actual path to your AMS installation direcotry:

    . path_to_installation_directory/adfbashrc.sh
    
  • To test that you properly sourced the adfbashrc.sh file you can type the following command, which should yeld the help message for the adfprep. command line tool:

    adfprep. -h
    

苹果系统

  • 从ADFJOBS GUI模块中,单击 帮助 下拉菜单并选择 终端. This will open a new terminal with all necessary 环境变量 already set and the adf. BIN folder already added to the PATH.

或者,您可以遵循Linux步骤。

视窗

每个Windows的AMS2019安装以及旧的ADF版本都有预先配置的命令行。 访问命令行的最简单方法是通过图形用户界面的帮助菜单:

帮助→命令行
Inside the command line window, type bash and hit ENTER (alternative: type sh)
_images / windows_scripting.png

从GUI调用命令行的优势是您将立即在当前工作目录中找到自己。 在GUI不可用的情况下,还可以直接使用预配置的命令行:

Double click the file adf_command_line.bat in your ADF installation directory (e.g. C:/ADF2018.104)

关于Python的笔记

应该使用Amsterdam建模套件附带的Python3解释器执行Python脚本:

$ADFBIN/startpython scriptname.py

可以在此处找到更多信息: 在ADF建模套件中的Python堆栈.