Skip to main content
Inspiring
March 7, 2023
質問

How can I rename TOC (HHC) and Index (HHK) files in RH X3?

  • March 7, 2023
  • 返信数 4.
  • 411 ビュー

I am migrating from X3 to the current version (2022).  One step in the process is to "upgrade" the X3 project to 2019 Classic, then on up to more recent releases.  One of the many projects I'm dealing with has an odd naming convention for the HHC and HHK files.  Via experimentation, I can see that the 2019 import/upgrade mechanism ignores those files and creates new (empty) ones, so I loose the quite extensive TOC and Index in the original project.  I have tried increasingly invasive renaming and in-file string substitution and whatnot but always run into problems; either the upgrade fails or the chm is produced but is corrupt and won't open or, of course, the TOC is simply absent.

As such, since I still have the X3 IDE available, my thinking is that if I could change those file names "officially", ie via the X3 IDE, then perhaps the upgrade to 2019 would work.  Problem is, I don't know how to do that!

 

    このトピックへの返信は締め切られました。

    返信数 4

    Peter Grainge
    Community Expert
    Community Expert
    March 8, 2023

    I wonder if generating a CHM without any expressions applied and then reverse engineering it to 2019 Classic would give a cleaner project? It should take no more than say half an hour.

     

    Reverse Engineering (grainge.org)

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    BarryMV作成者
    Inspiring
    March 8, 2023

    Thanks for your input, Peter.  I reviewed your linked information regarding Reverse Engineering, but I'm not certain how to exploit it.  So there's that.  At the moment, I'm leaning towards a procedure like the following, and I thought I'd get your thoughts on it.

    I notice that the TOC (aka HHC) file generated by the 2019 version is in XML, whereas the X3 version is in HTML.  I suppose I can manually or programatically (if need be)  transform the HTML into XML and be done with it.  I don't know about 30 minutes since my original is large, but I've tackled worse in my career!

    Community Expert
    March 7, 2023

    Or, if the project file, toc and index files (plus other supporting files) all have the same name, then try renaming the project?

    BarryMV作成者
    Inspiring
    March 8, 2023

    I appreciate your thought, but, alas, the names are inconsistent so I think I'm leaning to a procedure I outlined in a response to Peter.  Thanks!

    Community Expert
    March 7, 2023

    In RH2019 Classic and I'm fairly sure RH11 too, you can right click on the TOC and index files and select Rename. I can't remember as far back as X3 to know if that was an option back then.

     

    If it's not an option, it's probably possible to change the references in some source files. Since at least RH11 the main file is the xpj and you can open that in a text editor and change references. For X3 maybe it was the hpj? Then whatever the single source layout files were back then. Those would be the main places that would need to change to match the new file names. I'd probably need a file listing to bludgeon details from so long ago out of my brain.

     

     

    Community Expert
    March 7, 2023

    Ah, the old project file was the mpj - been noodling around old versions of Peter's site on the Wayback Machine 🙂  

    Jeff_Coatsworth
    Community Expert
    Community Expert
    March 7, 2023

    Do you have any intermediate (pre-2019) versions of RH available? Would upgrading to one of them make the process easier?

    BarryMV作成者
    Inspiring
    March 7, 2023

    I could conceivably get an intermediate but I am using a trial license and have already spent beaucoup time getting this far.  I should mention that I have successfully dealt with about 5 (of 40) projects thus far and ran into this snag on the 6th in my list.  I found out from a colleague this morning that this particular project was generated via a program (how exactly is anyone's guess) back in the 90s, so I think it may be the only oddball in the bunch.  At worst, if I can't manage to save the original TOC and Index, I could manually (ugh) recreate them in, I estimate, 10 hours or more, so that's what I have to weigh in my decisions going forward.