跳转到内容

Recipe Code Generator#

pylon Viewer 的 Recipe Code Generator 可让您生成示例代码,以便在开发环境中使用您的 vTool 配方。

运作原理#

使用 Recipe Code Generator 执行以下操作:

  • 该工具将当前打开的配方另存为指定文件夹中的 .precipe 文件。
  • 该工具生成的 C++ 示例代码允许您加载、启动和处理配方。示例代码文件与配方文件保存在相同的文件夹中。

生成配方代码#

要为您的应用生成配方代码:

  1. 创建配方或打开现有配方。
  2. Recipe Code Generator 打开方法:通过单击 Workbench 工具栏中的图标来或通过单击 Workbench > Recipe Code Generator.
    Workbench 工具栏屏幕
    即: Recipe Code Generator window opens:
    Recipe Code Generator 窗口
  3. 调整设置:
    • Name: Enter the desired name for the recipe.
      The name will be used as the recipe file name (<name>.precipe). Also, the name is used in the generated code.
    • 目标文件夹:选择要保存已生成文件的文件夹。如果该文件夹不存在,则将进行创建。
  4. 单击生成
    生成的文件将放置在指定的目标文件夹中。