Token substitution helper

  Plugin development, Scripting

When creating scripts and plugins it is sometimes convenient to be able to process a tokenized template and fill in selected values from calculated values or form attributes on the structure.

Some examples of this is the default file name template that allows the user to format the default file name of a PPLX file, and canned messages created by the Slack integration plugin.

If you want to incorporate this functionality into your plugins or scripts there are two helper methods to assist you.

  1. public String ReplaceTokens(String pInput)...

The replace tokens method replaces the standardized tokens (for example “%USER_NAME% is working on %Pole_ID%”) with the actual values for the currently loaded and calculated pole.

  1. public void DisplayTokensHelp()...

This method displays a help file with all of the implemented tokens.

Facebooktwitterlinkedinmail