• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RoboHelp 8 RHCL .exe command-line, can this automate updating of linked .fm files?

New Here ,
Feb 11, 2009 Feb 11, 2009

Copy link to clipboard

Copied

My work flow is as follows.

.fm files -> .book file -> linked in RoboHelp 8 project -> automated build of WebHelpPro via RHCL.exe.

If any of the .fm files are changed, the changes are NOT propogated to the WebHelp I generate because running the generate command from RHCL does not update the linked .fm files.

If I follow the same work flow but build WebHelp from the RoboHelp GUI then it prompts me, "Do you want to update linked files?"

So my question is, "Is there any way to force updating linked files at generate time?"
RoboHelp project property?
RHCL command line argument?

Thanks in advance,

Matt Moore

Views

5.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Feb 11, 2009 Feb 11, 2009

Copy link to clipboard

Copied

You can use RoboHelp's scripting feature to achieve this.
Below is a simple script that should solve the purpose. Save this script in a text file with extension .jsx (e.g. UpdateFM.jsx)
Place the script file at the appropirate location and call this script from command line before making a call to RHCL.exe. This can be done by typing the following command from command line
RoboHTML.exe -x UpdateFM.jsx

In case you face any issue, I can send you the script file.

Another way can be to not to use RHCL.exe at all. RoboHelp scripting is powerful enough to take care of SSL generation as well. The script can be modified to achieve this. In that case calling just the script should suffice.
Please let me know in case any further elboration is required.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2009 Feb 12, 2009

Copy link to clipboard

Copied

Can you direct me to the RoboHelp ExtendScript reference docs?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Feb 12, 2009 Feb 12, 2009

Copy link to clipboard

Copied

You can view the Object Model of scripting from ExtendScript Tookit.
1. In ExtendScript Tookit goto Help -> Object Model Viewer menu
2. Viewer will launch. Select "Adobe RoboHelp 8 Object Library" from the Browser drop down on the top left of the viewer

You can also refer the sample scripts installed with RoboHelp8

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2009 Feb 13, 2009

Copy link to clipboard

Copied

Thank you for your help Mayank.

My new problem is that the linked files are done by absolute path rather than relative path so the linked files are 'broken' in the .xpj when they are copied to the build box as they are copied to a different folder path then on my machine.

I tried to create a script that would open the .xpj and import the individual .fm files but that is failing. RoboHelp opens, my project is loaded, FrameMaker opens, yet no new files are in my RoboHelp.

For now I will stick with a manual generate from RoboHelp and commit the output pre-build rather than full automation/CI.

Thanks Mayank for your help, I've learned quite a bit from this.

Matt

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Feb 16, 2009 Feb 16, 2009

Copy link to clipboard

Copied

Inorder to solve your absolute path problem, you can try "Create a Copy and Link" option. This option creates a copy of the original source FM document. This copy is placed in the RH project folder and the copy is linked. RH keeps a relative path of the link. This option can be set in the "Import" tab of "Project Settings" dialog.

Besides this, if you want to go with scipt you were trying to write, you can share the script with me at my email id magrawalATadobeDOTcom

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mar 22, 2010 Mar 22, 2010

Copy link to clipboard

Copied

The script file attachment is somehow missing from my first post in this thread.

Here is the download link of the script.

Download Script

Mayank Agrawal

RoboHelp Engineering

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2011 Nov 03, 2011

Copy link to clipboard

Copied

Hello,

I'm attempting to use the attached script, but I get this error message: "Bad argument openProject". I found this thread: http://forums.adobe.com/thread/561384 but I am not running Windows 7, so I don't think the solution proffered there applies to my situation.

Any suggestions very welcome!

Thanks in advance!

Ryan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 03, 2011 Nov 03, 2011

Copy link to clipboard

Copied

Hi Ryan,

     you need to update the variable in the script "projectPath" before you run it for any project,

for example if you project .xpj path is "C:\Users\Ashish\Documents\My RoboHelp Projects\RH8_1\RH8_1.xpj" then you have to update   "projectPath = C:\\Users\\Ashish\\Documents\\My RoboHelp Projects\\RH8_1\\RH8_1.xpj" in your script and then run it.

The error shows that the path defined in the variable is incorrect.

Hope this will help

Regards

Ashish

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

Thanks, Ashish. I updated the project path per your suggestion, but now I get an error that says "Robohelp undefined". Is the syntax incorrect maybe? Here's what I have:

var projectPath = "C:\\techpubs\\AG\\SentrionAdminGuide.xpj";

// User should update the project path.

// e.g. "C:\\Users\\mayank\\Documents\\My RoboHelp Projects\\RH8_1\\RH8_1.xpj"

//PLEASE NOTE:  Replace '\' with '\\' in the path above.

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(false); //Update all linked documents (pass true for Force update)

        RoboHelp.quit(); //Quit RoboHelp

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 06, 2011 Nov 06, 2011

Copy link to clipboard

Copied

Hi Ryan,

            now a question arises how are you running this script.

there are two methods to run a RoboHelp's Extendscript

1. From within RoboHelp

     a. Launch RoboHelp

      b. Open script pod and Import the script to run in it

     c. Right click on the script and select run.

2. From command line 

    you need to use the RoboHelp engine to run a script directly from the command line the call will look like as shown below

"D:\Program Files\Adobe\Adobe RoboHelp 10\RoboHTML\RoboHTML.exe" -x  C:\Automation\scripts\FMLinkAndUpdate.jsx

which is <RoboHelp's exe path> -x <script path>

The error shows that it is not run through RoboHelp engine.

Hope this will help

Regards

Ashish


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 08, 2011 Nov 08, 2011

Copy link to clipboard

Copied

LATEST

Thanks, Ashish, running the script from within RoboHelp as you described did work. However, running it via the command line returns the "Bad argument openProject" error. Any idea why that might be happening?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp