Adobe RoboHelp: The User Defined Variable Converter Script

by Willam van WeeldenFollow us on Twitter View our profile on LinkedIn
 
User Defined Variables are a great way to manage content that appears frequently in your RoboHelp project. Variables allow you to change all occurrences of say, your company name in your project from a single location.
 
If you have already created a RoboHelp project but weren't aware of variables, you will be happy to learn that there is a script that quickly converts all occurrences of a word or phrase to a variable.
In my example below, I'm going to use the script to replace the word IconLogic shown below to a variable.

Text to be converted into a variable
  1. Make a backup of your project (this script will update your topics, and its better to be safe than sorry).
  2. Choose Tools > Scripts > UDV Converter with UI.
  3. In the Enter value to replace field, type a word or phrase. (I've entered IconLogic.)
  4. In the Enter new UDV name field, add the name of the variable to be created. In this case, I used CompanyName.
  5. In the Enter UDV value field, add a value for the variable. (In this case, I used the phrase IconLogic, Inc.)

    UDV Converter  
     

  6. Click Convert.
The script will go through the project and convert the text you indicated into a variable. In my example, the word IconLogic changed into the variable CompanyName. Because the value of the variable is IconLogic, Inc, that's the text users will see.
 
Conversion complete
 
Note: When running the script, only topic content is updated. (You can see in the image above that the topic title in the tab is left unchanged). If you want to modify the title, you will have to manually apply the variable in the topic title. Also, if your variables aren't green, check out my article about showing variables in topics.

6 Replies to “Adobe RoboHelp: The User Defined Variable Converter Script”

  1. I ran this script in a WebHelp project using RoboHelp 2015 to convert text in multiple topics to a variable. Unfortunately, RoboHelp crashed every time I tried to compile the help project after creating the variable using this script.
    I did not consider the variable as the cause of the crashes until I noticed the rhvariable.apj file was the only file that had changed since I had last successfully compiled the help project. As a result, I deleted the variable, replacing the variable with its content in each topic. Once I deleted the variable, the project compiled successfully.
    Interestingly enough, I created this same variable in another WebHelp project. However, I applied that variable manually in each topic instead of using the script. RoboHelp did not crash when I compiled that help project.

  2. I ran this script in a WebHelp project using RoboHelp 2015 to convert text in multiple topics to a variable. Unfortunately, RoboHelp crashed every time I tried to compile the help project after creating the variable using this script.
    I did not consider the variable as the cause of the crashes until I noticed the rhvariable.apj file was the only file that had changed since I had last successfully compiled the help project. As a result, I deleted the variable, replacing the variable with its content in each topic. Once I deleted the variable, the project compiled successfully.
    Interestingly enough, I created this same variable in another WebHelp project. However, I applied that variable manually in each topic instead of using the script. RoboHelp did not crash when I compiled that help project.

  3. I ran this script in a WebHelp project using RoboHelp 2015 to convert text in multiple topics to a variable. Unfortunately, RoboHelp crashed every time I tried to compile the help project after creating the variable using this script.
    I did not consider the variable as the cause of the crashes until I noticed the rhvariable.apj file was the only file that had changed since I had last successfully compiled the help project. As a result, I deleted the variable, replacing the variable with its content in each topic. Once I deleted the variable, the project compiled successfully.
    Interestingly enough, I created this same variable in another WebHelp project. However, I applied that variable manually in each topic instead of using the script. RoboHelp did not crash when I compiled that help project.

Leave a Reply

Discover more from The Logical Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading