18 Replies Latest reply on Jun 21, 2012 12:08 AM by Peter Grainge

    Making text display with conditional build expression

    JustinKelley68

      I'm having problems getting images and text strings to display in my single-source outputs. I have strings and images that have multiple build tags applied to them, and when I try to build for one of my SSLs, those strings and images don't show up because of multiple tags applied to them.

       

      For example, I have a string that has the conditions A, B, C, D, and E applied to it. (These are not the actual condition names; just for this thread's purposes). I want to generate the C output and have the string display, even though it has the other conditions applied to it.

       

      Peter Grainge: I read the Build Expressions wiki on your page and tried this combination (C AND NOT A AND NOT B AND NOT D AND NOT E). Sometimes I got the result I expected (the string displayed), and other times not (no string or image displayed), even though strings had the same conditions applied to them.

       

      Any idea why it's not working? Does the order of the conditions matter? e.g., the way you use them on the string, they should appear in that order in the build expression?

        • 1. Re: Making text display with conditional build expression
          Peter Grainge Adobe Community Professional (Moderator)

          Difficult one. I don't think the order is important, what matters is what you include and exclude and your expression prima facie makes sense.

           

          I would step away from the real project and set up a simple test project as I did for the expressions download on my site. That often makes is easier to see what is going on and get things working. Then you can apply your expression in your live project.

           


          See www.grainge.org for RoboHelp and Authoring tips

           

          @petergrainge

          • 2. Re: Making text display with conditional build expression
            mcallit82 Level 1

            I've also run into this problem and I could not get the build tags to build correctly in an output. If I did it in a simple project, it sometimes worked, but once applied to even a single topic in a larger project, it broke.

             

            What I've found most effective is to use all exclude conditions; tag everything the opposite of what you want it to be. In your example above, if you only have the five conditions applied to a string of text or to images, in the SSL make the output be only NOT A AND NOT B AND NOT D AND NOT E. If you don't specify a build tag in the SSL, it is output in the final build. (EDIT: Granted, with that setup, the text will always output. Even with your original SSL statement, the text will output since it's tagged C.)

             

            Or, as another example, I have stuff needs to be output in only one build for developers and another build for the help users. Anything that is going to be included for the developers is tagged not_help (that's the build tag name). Then in my SSL for the developer output, I don't include this tag. As a result, RH outputs everything (the whole paragraph below in example text is output). For the help build, I have NOT not_help included in the SSL. As a result of that, the help build leaves out the tagged content (only the first sentence of the paragraph below in example text is output).

             

            Example text:

            This is an example text. <not_help>This information is not be included in the help.</not_help>

             

            One of our projects contains many such tags for roles (role1, role2, role3, role4, for example). Some topics need to be output for role1 and role3, so for that build expression in the SSL we simply put NOT role2 AND NOT role4. We don't mention the other tags (role1 or role3), so those tags are brought into the output.

             

            It seems to be easier in RH to specify what is not included than to specify what should be included. Once you specify one thing to include, you have to specify them all (at least that's been my experience).

            • 3. Re: Making text display with conditional build expression
              Peter Grainge Adobe Community Professional (Moderator)

              Generally Exclude expressions are the easiest and are probably the first option to go for but there are times when they will exclude stuff you want in.

               


              See www.grainge.org for RoboHelp and Authoring tips

               

              @petergrainge

              • 4. Re: Making text display with conditional build expression
                JustinKelley68 Level 1

                I was talking over the problem with my co-worker and she found this item through a google search:

                 

                • When you have defined more than one conditional build tag, it is usually better to use inclusive conditional build expressions—in other words, expressions that specify the tags you want to include instead of those you want to exclude. For example, if you have three conditional build tags “Client_A”, “Client_B”, and “Client_C”, and you want to include only Client A content, you should use the conditional build expression “Client_A”. Ironically, to create this simplest of conditional build expressions, you need to click on the Advanced button in the Define Conditional Build Tag Expression dialog. You can then select the appropriate conditional build tag and use the Add Tag button to create the conditional build expression.

                 

                So in other words, enter the conditional you want to use in your build expression and don't enter any of the others. I was surprised but this did work for me. So in my case, the string with the conditions A, B, C, D, and E applied to it. I entered "C" in my build expression and nothing else. The string displayed when I generated the C SSL output.

                 

                Sometimes even doing this I still wasn't getting the output I wanted. I noticed I had to switch back and forth between the Design editor and the HTML editor to apply/remove conditional build tags. When I applied a build tag in the Design Editor, I would switch to the HTML editor and notice the tag still wasn't applied. Then after manually typing it in the html editor, the output was correct.

                 

                So, Peter, I think I've resolved this issue. Can you tell me how to speed up RoboHelp so it's not hanging so much with my various SSL outputs? I did delete the CPD file as you suggested and it didn't  help. I guess I need to re-read those threads you mention on your site.

                • 5. Re: Making text display with conditional build expression
                  Peter Grainge Adobe Community Professional (Moderator)

                  Glad you have resolved it. The whole thing comes back to working out tags that fit your scenario.

                   

                  Speed is affected by your PC, the number of topics, the number of images and bloat in the CPD. I am assuming your project is stored locally and that you have all patches applied.

                   


                  See www.grainge.org for RoboHelp and Authoring tips

                   

                  @petergrainge

                  • 6. Re: Making text display with conditional build expression
                    JustinKelley68 Level 1

                    Hi Peter,

                     

                    I was referring to this snippet on your page about why RH gets slow and unresponsive and the possiblity of it being related to the number of SSL layouts:

                     

                    "This problem crops up from time to time and in most cases it is because the CPD file has become bloated. The solution is usually to delete the CPD and reopen the project. That is covered in Opening Projects on this site.

                    There were two threads though where this did not fix the problem in RoboHelp 8. See http://forums.adobe.com/thread/776782 and http://forums.adobe.com/thread/698592. There you will see that the initial cause was pinned on the number of layouts but I had seen projects with many more that worked just fine.

                    Eventually MeWrite identified that it was not the number of layouts but the number of URLs they contained. Lee Passey then identified a workaround. He identified that  the list of publication servers is stored in an XML file named "pblsvrs.sss" and by swapping different versions of that in and out of the project, performance became acceptable."

                     

                    I have 151 topics in the project. 65 images. My project is stored locally. I'm running RH version 8.0.2.208. Yes, my project is running locally on my PC.

                     

                     

                    • 7. Re: Making text display with conditional build expression
                      Peter Grainge Adobe Community Professional (Moderator)

                      That is a very small project. Have you tried opening the Salesbuilder sample project and comparing? It is smaller than your project but larger than the other sample.

                       

                      Click Open on the RoboHelp Starter page and then click Samples in the ribbon on the left.

                       

                      You have pointed to a potential cause but not indicated whether or not you have publish locations with lots of URLs.

                       

                      Next step would be to create two copies of your project and in each half trash a different half of the topics. Ignore broken links. Does one half then work quicker?

                       

                      Just how bad is this slowness?

                       


                      See www.grainge.org for RoboHelp and Authoring tips

                       

                      @petergrainge

                      • 8. Re: Making text display with conditional build expression
                        JustinKelley68 Level 1

                        Slowness is horrible. I'll right-click on an SSL, waiting for the pop-up dialog to show. It can take more than a minute for the pop-up dialog to show up, if it does at all. When I click one of the commands on the pop-up (typically Generate or Properties), it can take another minute before the webhelp output dialog displays. Slowness is exacerbated every time I click in the Single Source Layouts pod.

                         

                        I leave Task Manager on to monitor how much CPU-resources RH takes when I click on these layouts. CPU usage is always maxed out and the RH screen sometimes goes completely white and tries to refresh and repaint. This is all happening as I type.

                         

                        I have 19 websites defined for publishing, but for any SSL, I only ever have two selected for publishing. Will I see an improvement if I delete them? I hand off my webhelp projects to another writer through a Dropbox account, so I don't need them defined anymore.

                         

                        I'll look at the sample project and try the two projects approach.

                        • 9. Re: Making text display with conditional build expression
                          Captiv8r Adobe Community Professional & MVP

                          Hi there

                           

                          Slowness is horrible?

                           

                          Please click File > Rename project and copy what is in the field. Then cancel the dialog. Post that result into a reply.

                           

                          Cheers... Rick

                           

                          Helpful and Handy Links

                          RoboHelp Wish Form/Bug Reporting Form

                          Begin learning RoboHelp HTML 7, 8 or 9 within the day!

                          Adobe Certified RoboHelp HTML Training

                          SorcerStone Blog

                          RoboHelp eBooks

                          • 10. Re: Making text display with conditional build expression
                            JustinKelley68 Level 1

                            Peter--Didn't see the Salesbuilder project. Is that from a newer build of RH?

                             

                            I also divided up the project as you suggested. Didn't see a performance difference between the two. When I would right-click on a SSL, RH wouldn't respond and bog down. The screen would go blank just as before with both versions.

                             

                            Rick--You're just asking for the name of my project? This is the name of it, copying it from the Rename project dialog: LifeLineHelp_RH

                            • 12. Re: Making text display with conditional build expression
                              JustinKelley68 Level 1

                              rh_renamedialog.png

                               

                              Are you thinking it's a path problem for the project folder?

                              • 13. Re: Making text display with conditional build expression
                                Peter Grainge Adobe Community Professional (Moderator)

                                I suspect Rick's thinking was checking on either a network drive or a very long path.

                                 

                                Yes Salesbuilder is from RoboHelp 9 so try whatever shipped with 8.

                                 


                                See www.grainge.org for RoboHelp and Authoring tips

                                 

                                @petergrainge

                                • 14. Re: Making text display with conditional build expression
                                  JustinKelley68 Level 1

                                  So it sounds like if I use a shorter path, I should see faster results with RH? I'll give it a try.

                                  • 15. Re: Making text display with conditional build expression
                                    JustinKelley68 Level 1

                                    Rick, Peter,

                                     

                                    I tried moving my project path to a top-level directory on my local drive. I don't see any improvement in performance. Still seeing the CPU get maxed out when I right-click on a SSL layout. Still can take a minute for the pop-up menu to display and another 30 seconds for the webhelp generation dialog to display.

                                     

                                    My new project path:

                                     

                                    projectpath.png

                                    • 16. Re: Making text display with conditional build expression
                                      Peter Grainge Adobe Community Professional (Moderator)

                                      The CPU will always show as maxed out. Ignore that.

                                       

                                      Open any sample or create a new project. Still slow?

                                      • 17. Re: Making text display with conditional build expression
                                        JustinKelley68 Level 1

                                        I did open a sample project in RH 8. When I right-click on an SSL layout in the project, it's much faster opening up the Webhelp options dialog. It takes about 2 seconds for the dialog to open as opposed to the 45 seconds or more it takes with my project.

                                        • 18. Re: Making text display with conditional build expression
                                          Peter Grainge Adobe Community Professional (Moderator)

                                          OK so that establishes it is something about your project.

                                           

                                          I'm thinking that given the project is relatively small, it might be quicker to create a new project and starting importing the topics. Test every so often by closing and reopening and generally testing what is slow. Chances are it will fix the problem but if not, you should see where it goes belly up.

                                           

                                          Anything else is trial and error and in this case will overall take longer.

                                           


                                           

                                          See www.grainge.org for RoboHelp and Authoring tips

                                           

                                          @petergrainge