BLT for LabVIEW (Build, License, Track)

cancel
Showing results for 
Search instead for 
Did you mean: 

5. How to lock portions of your code based on the license permissions?

The way to protect certain portions of your code with BLT for LabVIEW is to create Product Features.

A Product Feature means for something that you can enable or disable for a particular license or group of licenses.

In this tutorial, we are going to create 2 Product Features: Base and Professional.

Depending on which of those features is enable for a specific license, the user will not be able to access certain portions of your program.

  • Select in tle list the product foe which you want to lock portions of your code.
    Then click on the button "Configure Product attributes"
    Menu.png

  • Click ont the "Features" tab ans click Add to add a new feaqture for your product
    Features menu.png

  • Enter a name for the product feature. The ID is important since you will use it retrieve the state (enabled or disabled) of the feature in the user's license from your code.
    New Feature.png

  • Now, we have created 2 features for our product. The Base feature has the ID 9 and the Professionnal feature has the ID 10.
    Features list.png

  • Close this window and open your LabVIEW Project for this application.

  • Place the Get Features access function on your clock diagram. You can find this function in the BLT API (Pallette Addons >> BLT for LabVIEW).
    BLT Features context help.png


  • Use the following algorithm to check the state of the feature and lock certain part of your code if you need:

    Block Diagram.png
  • You can now Build and Distribute your product to apply the change.

  • In order to assign permissions for those features, select in the BLT dashboard the License(s) for which you want to specify Product Features permissions. Then click on Configure Product Feature permissions.
    Menu Features permissions.png

  • Drag and Drop the feature name for which you want to give access from the list on the left to the list on the right. Finally, click Apply to set permissions.
    Features permissions.png

You are now ready. Your product contains 2 versions Base and Professionnal and some features of your code will be unaccessible for users who don't have rights to this Product feature.



Matthias Baudot | Software Architect | Founder at STUDIO BODs


STUDIO BODs     BLT for LabVIEW     LabVIEW Champion     Certified Professional Instructor     DQMH Trusted Advisor     GCentral Sponsor


 Check out my LabVIEW presentations and videos!

0 Kudos
Message 1 of 1
(6,728 Views)