12 Replies Latest reply on Jun 7, 2006 11:27 AM by themint100

    Calling CSH in Merged webhelp

    themint100
      This is more of a re-phrase than a new post: I've created a merged webhelp project (using Peter Grainge's excellent guidelines) and have two questions:

      1) Can someone point me to the spot in the RH help that discusses how to call webhelp using Map IDs from an application?

      2) My merged webhelp project has a parent and several children. Each of these still has its own .h file, right? How does that affect the Map ID lookup? (If I regenerate a child project, its .h file will be updated...do I need to copy that up, merge them together, or what?)

      Thanks,

      -Greg
        • 1. Calling CSH in Merged webhelp
          themint100 Level 1
          Just wanted to give a better description of my problem (thanks in advance):

          The source folders for my merged project have this structure:

          \rh_projects
          ..\parent
          ..\projects
          ....\child1
          ....\child2
          ....\child3

          I load each project and create Map IDs for CSH. We need to use Map IDs, I can't use the URL technique Peter Grainge describes. I make sure that each child project's map IDs start with a different base number (e.g., child 1 starts with 1000, child2 starts with 2000). If I load and save each project, I get a .h file in the main project and for *each* child project:

          \rh_projects
          ..\parent
          ...BSSCDefault.h
          ..\projects
          ....\child1
          .....BSSCDefault.h
          ....\child2
          .....BSSCDefault.h
          ....\child3
          .....BSSCDefault.h

          The .h files look something like this (not real names, but you get the idea):

          For \parent:
          <empty file>

          For \child1:

          #define child_1_topic_1 1000
          #define child_1_topic_2 1001

          For \child2:

          #define child_2_topic_1 2000
          #define child_2_topic_2 2001

          For \child3:

          #define child_3_topic_1 3000
          #define child_3_topic_2 3001

          When I generate and publish, I get the following directory structure:

          \rh_generate
          ..\mergedProjects
          ....\child1
          ....\child2
          ....\child3
          ..\whdata
          ..\whgdata
          ..\whxdata

          (Same structure when you publish.)

          If you try to test the output with the CSH Test tool at this point, you won't be able to, because you're prompted for a .h file. Generating does *not* copy any of the .h files to the output folder...you have to do this manually. Well, I want to use the .h files anyway, so that's OK. Question is, which files do I copy, and where?

          Since I was careful to keep the IDs unique in each project, I decided to merge them into a single file and put it at the \mergedProjects level:

          \rh_generate
          ..\mergedProjects
          ...BSSCDefault.h
          ....\child1
          ....\child2
          ....\child3
          ..\whdata
          ..\whgdata
          ..\whxdata

          This merged .h file looks like this:

          #define child_1_topic_1 1000
          #define child_1_topic_2 1001
          #define child_2_topic_1 2000
          #define child_2_topic_2 2001
          #define child_3_topic_1 3000
          #define child_3_topic_2 3001

          I then fired up the CSH Test tool, selected the merged .h file, and it *almost* works. Choosing any map ID shows the correct topic, but not in the three-pane window. Instead, I see only the topic with the "Show" link in the upper left corner. I want the correct topic to appear in the three-pane window.

          Any ideas?

          -Greg
          • 2. Re: Calling CSH in Merged webhelp
            HKabaker Level 2
            Greg,

            In consistently getting the right topic to pop up, you have achieved more than a lot of other people have done, I think.

            (Applause)


            I believe the CSH engine was designed to work as you describe, opening the topic in its own window. You have to click the Show link to see the left pane.

            Generally, to put the selected topic into the topic pane of an open WebHelp window, or opening a new WebHelp window if necessary, needs some variation on a search string beginning

            myproject.htm#...

            I've never used merged WebHelp like this, but maybe somebody has figured out how to do what you're attempting.

            Harvey

            • 3. Re: Calling CSH in Merged webhelp
              ahreed
              I've recently converted a large HTML Help system to WebHelp and had to deal with the same issue. I suspect that there may be easier methods if your platform is VB or C#, etc.; however, our product is developed in AcuCOBOL, so we didn't find much guidance in the annals of RH help.

              Here's how our solution works:

              When help is invoked from one of our programs, we pass the map ID to a redirect program that one of our developers wrote. We store the map files (*.hh) in a folder on our web server. (As new map IDs are added, I simply run a batch file that copies the map files from the project folders to the common folder on the web server.) The redirect program knows from the map number and defined map number ranges which map file to look in, locates the line in the map file that corresponds to the map number, parses the string to pull out the topic's file name, strings the path together using the myproject.htm#mergedProjects/.../topic_name.htm format (where ... refers to whatever your directory structure below the mergedProjects folder is), and passes the path to the browser.

              Hope this can give you some useful ideas.

              Regards,
              Gay
              • 4. Re: Calling CSH in Merged webhelp
                themint100 Level 1
                Think I may have gotten it to work! I'm going to do a little more testing this week and weekend, and if I get it all humming, I'll post my solution.

                (BTW, thanks Gay and Harvey for responding...Gay, I wanted to avoid making our developers write any more code, and think I have!)

                -Greg
                • 5. Re: Calling CSH in Merged webhelp
                  MergedConfused


                  You said you created a merged webhelp project using Peter Grainge's excellent guidelines...could you please tell me where I could locate these guidelines, because I'm trying to merge 4 help files together for the first time and I don't have a clue.

                  Thanks

                  -Judy
                  • 6. Re: Calling CSH in Merged webhelp
                    MergedConfused Level 1


                    You said you created a merged webhelp project using Peter Grainge's excellent guidelines...could you please tell me where I could locate these guidelines, because I'm trying to merge 4 help files together for the first time and I don't have a clue.

                    Thanks

                    -Judy
                    • 7. Re: Calling CSH in Merged webhelp
                      Level 7


                      You said you created a merged webhelp project using Peter Grainge's excellent
                      guidelines...could you please tell me where I could locate these guidelines,
                      because I'm trying to merge 4 help files together for the first time and I
                      don't have a clue.

                      Thanks

                      -Judy

                      • 8. Re: Calling CSH in Merged webhelp
                        Peter Grainge Adobe Community Professional (Moderator)
                        Welcome to the forum.

                        Hopefully you will need to change your username after reading this. Click here.

                        • 9. Re: Calling CSH in Merged webhelp
                          MergedConfused Level 1
                          You're right, I'm no longer confused. I also looked at your web site and now I have answers to questions that have been unanswered for a while. Thanks for your help and your terrific web site.

                          -Judy
                          • 10. Re: Calling CSH in Merged webhelp
                            themint100 Level 1
                            Hi Judy,

                            Sorry for the radio silence, I was out of town for a couple days, but I saw Peter had replied.

                            I am still making 100% sure my technique works before describing it for all, but it started with Peter's merged webhelp directory structure & other tips (which you've now found).

                            If I get everything working successfully, I'll post it so all can (hopefully) benefit.

                            -Greg
                            • 11. Re: Calling CSH in Merged webhelp
                              Peter Grainge Adobe Community Professional (Moderator)
                              Greg

                              I would certainly like to add something to my topic as this is a regular request. If you can post something or send it to me, then I will add the information with credit to you.

                              • 12. Re: Calling CSH in Merged webhelp
                                themint100 Level 1
                                Success!

                                After lots of starts & stops & head scratching, I finally figured out how to do a merged webhelp project that can:

                                A) use Map IDs for lookup rather than having to specify a pathname
                                B) be incrementally updated (e.g., you add a plug-in and want to just distribute the new doc, but still support CSH)

                                Peter Grainge was kind enough to post the little article I wrote on his website:

                                http://www.grainge.org/pages/authoring/calling_webhelp/using_map_ids.htm

                                -Greg