DIAdem Help

Creating a Template for Custom Properties with a Script

  • Updated2024-09-12
  • 2 minute(s) read

Creating a Template for Custom Properties with a Script

Use templates for custom properties so that DIAdem adds the associated custom property from the template when DIAdem loads new data into the Data Portal or creates new channel groups or channels. To create a template, for example, for channels and channel groups and to then load a data set, using a script complete the following steps:

  1. Select DIAdem SCRIPT.
  2. Select File»New»VBS Script to create a new script.

  3. Enter or copy the following text into the script editor:

    VBScriptPython

     

    Dim oMyPropTemplate
    UsePropTemplate = 1 'Activates the custom property templates
    Set oMyPropTemplate = Data.Settings.CustomPropertyTemplate
    Call oMyPropTemplate.ChannelProperties.Add("MyChnProp", 2) 'Adds a custom property template for channels
    Call oMyPropTemplate.ChannelGroupProperties.Add("MyChnGrpProp", 5) 'Adds a custom property template for channel groups
    Call Data.Root.Clear() 'Deletes the internal data
    Call DataFileLoad(DataReadPath & "Example.tdm") 'Loads the example data set
    	
  4. Select Script»Run VBS Script to start the script. DIAdem creates the templates for channels and channel groups and then loads the Example.tdm data set.

Examples

Brake Tests for Trucks | Checking DataPlugins for Timeout | Combining DataFinder Search Results | Context Menu for the Search Results of the DataFinder | Creating ATFX Files from the Context Menu of an ASAM Data Store | Customized User Interface | Evaluation Wizard for the Search Results of the DataFinder | Filtering Data with a Dialog Box | Filtering Data without a Dialog Box | Search and Evaluation Functions in User Dialog Boxes | Searching for and Evaluating Channels | Searching for Channels in the NAVIGATOR | Searching for Data Sets Marked "Failed" in Data Stores | Searching for Data Sets Marked "Failed" | Searching for Properties and Evaluating the Associated Channels | Varying Browse Settings of a Data Store

Log in to get a better experience