Skip to main content
Inspiring
May 9, 2012
Question

RH script: updateAll(true) does not add new file to TOC

  • May 9, 2012
  • 1 reply
  • 934 views

I use this script to update my RoboHelp project from FrameMaker source before generating WebHelp:

var projectPath = "C:\\<path>\\<RH project>.xpj";

main();

function main()

{

        if(projectPath == "")

        {

               //Error!. Quit RoboHelp

               alert("Project path is not defined. \nPlease update the 'projectPath' variable in the script.");

               RoboHelp.quit();

        }

        RoboHelp.openProject(projectPath); // open the project

        RoboHelp.project.updateAll(true); // force-update FrameMaker source

          RoboHelp.closeProject(); // close the project

        RoboHelp.quit(); //quit RoboHelp

}

I added a new file to the FrameMaker book and it failed to add the new file to the TOC. When I ran the Force Update All command manually, it worked.

Do I need to add something or is that a bug?

This topic has been closed for replies.

1 reply

Willam van Weelden
Inspiring
May 9, 2012

Hi,

Since you’ve confirmed that the manual route does work, I think it’s safe to assume it’s a bug. I’m sorry to see that your first encounter with scripts gives you so much woe.

Greet,

Willam

Inspiring
May 9, 2012

It's hardly my first encounter with scripts, only with ExtendScript.

Willam van Weelden
Inspiring
May 9, 2012

Ah well, scripting in RoboHelp then