Migrating To External User Code Handling

This section will give you an overview how to migrate your DaVinci Project to the new User Code Handling in the DaVinci Configurator Classic Version 6.

Why You Need to Migrate?

The DaVinci Configurator Version 6 introduces a new approach to managing user code blocks during source file generation. Instead of versioning the user code blocks in the generated source data, you can now separate the user code blocks in an own input file format.

This change separates the user code from the generated files, which allows you to use performance optimizations and better version control for user modifications.

Migrate DaVinci Project to the new User Code Handling

  1. Secure that you have up-to-date generated files. If you are not sure, generate the source files with the DaVinci Configurator Version 5.

  2. Specify a location to store the user code blocks in your projects General.json:

    "folders": {
        "userCodeBlocks": "Config/UserCodeBlocks"
    }

    With this configuration, DaVinci Configurator Classic automatically runs dvuct restore after every project generate and project generate-swct command.

  3. Use the DaVinci User Code Tool to extract the user code blocks from the generated files.

    The DaVinci User Code Tool is located in the DaVinci Configurator installation directory under: ./dvuct.

    $ dvuct.exe store -r=<PathToGenData> -u=<PathToUserCodeFiles>

    This command extracts all user code blocks from the generated files located in <PathToGenData> and saves them into separate *.ucb files in the <PathToUserCodeFiles> directory.

    Please specify a separate folder called GenData, GenDataVtt, and Templates under the folder you’ve set in the General.json to distinct between the generated sources.

    If the source folders are located in the same directory, you can also specify the common parent directory as <PathToGenData> and the folder given in you project settings as <PathToUserCodeFiles> when storing the user code blocks.

For more information about the DaVinci User Code Tool, refer to the section Generate Source Files with Custom User Code Blocks.