Example Code

Creating a License File in LFEdit

Introduction

This tutorial will walk you through the process of creating a License File in LFEdit, and describing what the purpose of each of the fields is.

Steps to Complete

  1. If you have an activated version of Protection PLUS you can use your own product definition to create a license file (Creating a Product Definition in LFEdit). Otherwise, you can use one of the provided sample product definitions.
  2. Select New License File from the File menu, type CTRL+N or select the New button to bring up the new license file dialog.
  3. Select the product definition you want to create the license file for from the drop-down list. Click OK.
    step3.PNG
  4. In the General tab, you can include information about the company you are creating the license file or, if you are going to be making a license file specifically for them. In cases where you are creating a license file for distribution with an installer, you probably want to leave this page empty.
    step4.PNG
  5. In the Expiration Fields page, you can customize how the license file behaves. For example, if you want to distribute a fully activated license, you can select N - None in the Type field. In most cases, you can leave this page as it is by default. Please review the SoftwareKey documentation for more advanced options.
    step5.PNG
  6. The rest of the pages can be left as default. Again, if you would like to customize your license file even further you can review the SoftwareKey documentation
  7. If you would like to save the file in its default location (that you picked when creating the product definition), select Save License File from the File menu. You can also use the CTRL+S keyboard shortcut or click the Save icon in the toolbar. If you would like to save the license file in a different location, select Save License File As from the File menu. Select the Browse button to choose the location you want to save the new license file and then click Save.
    step7.PNG

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors