Skip to main content
Participant
June 13, 2016
Question

Why aren't snippets included in help when building from command line.

  • June 13, 2016
  • 1 reply
  • 312 views

Edition:

RoboHelp 2015 (with latest updates)

Operating System:

WIndows 8.1 Enterprise (64-bit)

Outputs:

Merged CHMs and merged Responsive WebHelp

The issue:

We have multiple projects that merge into a single help system. We use snippets extensively in throughout multiple topics.

Everthing works as expected when we build CHMs and WebHelp directly from the RoboHelp interface, which means the snippets are included in the output; however, when we build the same help (from the same projects) using the command line functionality, the snippets are not included.

Anyone have a clue about why that might be the case?

Thanks.

This topic has been closed for replies.

1 reply

jmkinskyAuthor
Participant
June 14, 2016

Turns out that the root cause was idiocy. Apparently, I'm
afflicted with it.

I was using a batch script with variable parameters to build
the RoboHelp projects, which seemed to work except for the snippets. After spending
time with the support folks, via chat, we found that the rhcl command line
syntax will not parse variables fully, so only part of the command would execute.
The input arguments to the rhcl command must be literal.

I changed the script and it worked the first time. (I also
set the path environment inside the script to indicate the location of the
rhcl.exe file for just that session. That seems to be a factor, but I wouldn’t
insist on it at this point.)

While the information at http://help.adobe.com/en_US/robohelp/robohtml/WS5b3ccc516d4fbf351e63e3d11aff59c2a0-7fe3.html
does not exclude using variables, the topic does not say they are permitted
either. I just assumed they were permitted. My mistake.

Inspiring
June 14, 2016

I'm interested in this thread because I use the rhcl.exe to compile my project. In the future, I may end up with multiple projects. I'd like to know what did and didn't work when using rhcl.exe so I can avoid what you ran into.

Can you please post your script in this thread? If possible, I'd like to see both the "broken" and the "fixed" commands so I can learn more.

jmkinskyAuthor
Participant
June 14, 2016

Necessary context to understand the scripts. Each project is in a folder/directory of the same name. So the index directory contains the index.xpj project file and so on. Each lauout contained the instructions for the build target destination. Iterating through the folders to execute the project files in a single command line seemed like a simple solution compared to creating multiple command in the scripts. Sadly, that approach wasted a lot of time.

Here's a bad script, which seemed to work until we noticed snippets were not included in the built output.

set RH=C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML\rhcl.exe
set PJCT_ROOT=%CD%

for %%f in (index toolkit) do "%RH%" "%%f\%%f.xpj" -l %%f_chm

Here's an example of the script that worked, which can become tedious and long, but it does work.

REM Set PATH to include RoboHelp
set PATH=%PATH%;C:\Program Files (x86)\Adobe\Adobe RoboHelp 2015\RoboHTML\

REM Build CHM files
rhcl.exe index\index.xpj -l index_chm -o _AllOutputs\CHMS\
rhcl.exe toolkit\toolkit.xpj -l toolkit_chm -o _AllOutputs\CHMS\

There are probably easier or more elegant solutions. This one works for now, which is all I care about.