7 Replies Latest reply on May 16, 2006 1:25 PM by Laura Sala

    map files

    Laura Sala
      i think the answer is NO, but hey, you never know...

      We are going to start generating two unique help files (.chm files) from one project file. One chm is for our customers who own hardware stores. The other chm is for our customers who own automotive part stores. Our developers say that they only want one map file. So, say chm file A will have map ID 1 attached to a topic called "inventory_retail.htm." Well, chm file B needs to have map ID 1 attached to a topic called "inventory_automotive.htm."

      Just a sidenote, in case this is relevant....
      One of our programmers has come up with a unique way of making context sensitivity work. When I set up map IDs, in the Topic ID field, I enter the exact name of the application window to which the context sensitive topic is linked. For example, I have a map id whose topic ID is "Inventory_Maintenance" because the application window is called Inventory Maintenance. Thus, the second parameter in the BSSCDefault.h file (the topic ID) is equal to the screen name in our application. The programmer made it so the function which calls help reads the BSSCDefault.h file, and if the map id in the application window is set to 0 (zero), it gets the topic id out of the.h file using the screen name. In other words, this keeps the programmer from having to put the various map ids into the application...he can just enter a 0 in every application window, and the whole thing works beautifully.

      So, back to my question...
      I can't see any way that i can have one map ID that would work with two different topics (so if i'm a hardware store, and i have chm file A, and click Help, i get the topic "inventory_retail.htm." but if I'm an automotive customer, and I have chm file B, and i click Help, I get the topic "inventory_automotive.htm.")

      Am i right that this would only work if we have 2 map files?
      Of course, I hope i'm wrong... : )

        • 1. Re: map files
          Level 2

          The way context sensitive help was designed for compiled HTML Help was so that you could have one map file that the developer could produce. As the help author, with two .chm files, you might have two alias files, however. Open up your .h (or .hh) and .ali files from your project. These will both be text files so you can open them in notepad. The .hh file will have the syntax #define IDH_IDNAME mapnumber and the .ali file will have the syntax IDH_IDNAME=topicfilename.htm. The two file technique is used to allow just what your developer is asking for. The developer wants to produce a single map file and you want to link the same map number to different topics.

          I'm not sure how to tell you how to do this in RoboHelp - I would manually edit the .ali file - and a lot depends on how you are producing the two .chm files. Are they separate projects or are you using build tags from a single project?

          • 2. Re: map files
            Laura Sala Level 1
            John, I am using build tags to produce two .chm files from a single project.

            • 3. Re: map files
              Level 2

              That complicates things for me because I am not very familiar with the latest versions of RoboHelp. I don't know if you can easily manage two .ali files from within RH. My version of RH predates build tags and I do a lot of work outside of RH. I don't know if that would be practical in your development environment. I'm sorry I can't be of more help. Hopefully, someone more knowledgable will pick up this thread.

              • 4. Re: map files
                Laura Sala Level 1
                No problem. Thank you for pointing me toward multiple alias files as a possible solution.
                • 5. Re: map files
                  Kathy T Casey Level 1

                  I think John is on the right track here. If you are producing different .chms from the one single source, you need to be able to manipulate the .ali file that will be used with each of the compiles.

                  I had to do a similar thing recently to maintain different wording on TOCs for two builds from the one project. I just shuffled the .hhc files from my two special 'holding pens' and copied the one I wanted back into the project before I compiled.

                  You could create one .ali file by linking the context ids to the relevant topics for the first build and then copy it to a 'holding pen' directory somewhere safe. Then create the .ali file for the second build and copy it to another holding pen.
                  Then when you need to compile you could copy the relevant .ali for the build you are working on. Then replace it for the next compile.

                  As it can't be automated, you'd have to be very deligent about updating both .ali files with new topics and changes as they occur.

                  It's a bit of a drag - but it does work.

                  • 6. Re: map files
                    ElisaFnord Level 2
                    Hey, Laura.

                    I think multiple .ali files is the right solution.

                    Just for grins and giggles, did you try a single .ali file with all the topics and duplicate IDHNAMEs? I don't know if you're allowed to do this in the RH GUI, or if you can get away with it in Notepad, but it might be worth testing on a copy of your project for a small subset of screens.

                    .hh file -
                    #define INVENTORY 31 (31 is the map ID for the app Inventory screen)

                    .ali file -

                    With any luck, the CSH call will find whichever of the topics actually exists in this conditional build. (This inspiration is courtesy of AuthorAnne, who just explained to me that merged .chms work kind of like this.)

                    • 7. Re: map files
                      Laura Sala Level 1
                      Thanks so much Kathy and Elisa!