Skip to main content
Inspiring
October 25, 2021
Question

RoboHelp 2020 Update 6 can't import map files that contain comments.

  • October 25, 2021
  • 3 replies
  • 111 views

I'm currently experiencing an issue importing map files that were generated by Microsoft Visual Studio. The file has more than 1700 lines, but when I try to import it, I end up with an empty file in RoboHelp. (RoboHelp 2020 Update 6)

 

My tests seem to show that the issue is caused by comments that are automatically included in the file that Visual Studio generates. Look at the attached "resource.txt" file. Normally, this is named "resource.hm" when generated by Visual Studio, but I wasn't able to upload it with that extension so I had to rename it. So, if I remove the comments found at the end of each line (starting with //). then the map ID's are imported just fine. (note that the 3 lines of comments at the very beginning of the file don't seem to matter. I only needed to remove comments to the right of each #define.)

 

This issue seems to be affecting only recent versions of RoboHelp. I tested this with RoboHelp 2020 update 5 and update 6. Previously, I was using Adobe RoboHelp version 7.03.001, and importing this file "as-is" worked just fine. I still have that old version on an old laptop, so I just tried it and confirmed that it still works in that version.

 

Interestingly, upgrading an old classic RoboHelp project containing that same map file worked fine. It's only when trying to import the file manually (on its own, in a new project) that I'm getting this issue.

 

Also, if the help ID name is too long, Visual studio splits the line so that the map ID number ends up in the same column as the others. This seems to cause an issue where the corresponding map ID is just missing in RoboHelp. You can look at the attached screenshot of Notepad++ for an example, and you can also look at resource.txt, at lines 422 and 423. The workaround for this is to remove the backslash and adjust the line so that everything is on the same line, with a space between the Help ID name and the Help ID number. Then the map ID will get imported properly.

 

So, it looks like there is an issue with how RoboHelp parses .hm files, and somehow gets "blocked" when it hits a comment mark ( // ) anywhere on a line. It seems to act as if the whole line was commented. This is really an issue with the current release of RoboHelp, as this was working in a previous RoboHelp release. It is also worth noting that programmers have no control over how that file is generated or formatted in Microsoft Visual Studio.

 

As for the "split-line" issue, I think this was always present, as even RoboHelp 7 does the same thing. That said, I still think this needs to be addressed, as, again, Visual Studio automatically generates the file that way and we have no control over it.

 

If anyone is interested, the best workaround that I know of for now is to use Notepad++ "column select" functionality to get rid of the comments. Basically, open the file in Notepad++, then:

  • place the cursor on line 4, column 51.
  • From there, press and hold SHIFT+ALT on your keyboard.
  • While holding SHIFT+ALT, press PGDN until you reach the end of the file, then use the RIGHT-ARROW key to select everything to the left of column 51.
  • Hit the DELETE key.
  • Save your changes

 

Now that the file is cleaned of comments, it should import properly in RoboHelp. That works for now, but this shouldn't be necessary. RoboHelp should be able to import that file as it is, without modifications.

    This topic has been closed for replies.

    3 replies

    Inspiring
    October 26, 2021

    Bug submitted!

     

    Bug Id: RH-10303

    Community Expert
    October 25, 2021

    And thank you for the detailed post and workaround. 🙂

    Community Expert
    October 25, 2021

    You can request features and report issues here: https://tracker.adobe.com/

    Post the item number in the discussion so people can easily vote if they want the same functionality.