Highlighted

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

New Here ,
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.1K

Likes

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

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

New Here ,
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.1K

Likes

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
Feb 11, 2009 0
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.

Likes

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
Reply
Loading...
Feb 11, 2009 0
New Here ,
Feb 12, 2009

Copy link to clipboard

Copied

Can you direct me to the RoboHelp ExtendScript reference docs?

Likes

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
Reply
Loading...
Feb 12, 2009 0
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

Likes

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
Reply
Loading...
Feb 12, 2009 0
New Here ,
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

Likes

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
Reply
Loading...
Feb 13, 2009 0
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

Likes

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
Reply
Loading...
Feb 16, 2009 0
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

Likes

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
Reply
Loading...
Mar 22, 2010 0
New Here ,
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

Likes

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
Reply
Loading...
Nov 03, 2011 0
Engaged ,
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

Likes

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
Reply
Loading...
Nov 03, 2011 0
New Here ,
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

}

Likes

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
Reply
Loading...
Nov 04, 2011 0
Engaged ,
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


Likes

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
Reply
Loading...
Nov 06, 2011 0
vanamee LATEST
New Here ,
Nov 08, 2011

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Nov 08, 2011 0