9 Replies Latest reply: Nov 14, 2012 9:37 AM by Sabrina Richter RSS

    Load help text of objects

    Sabrina Richter

      Hi all,

       

      for a documentation of an application I do need all the Help texts of every object.

      Until now, I used the document analyzer of Rob Wunderlich ( http://robwunderlich.com/downloads/ ) and it worked fine.

      What I now need is add the help texts to the objects.

      Anyone now where I can find it?

       

      Thanks!

        • Re: Load help text of objects
          Mayil Vahanan Ramasamy

          HI

           

          HelpText.bmp

           

          Are you mentioning this?

              • Re: Load help text of objects
                Mayil Vahanan Ramasamy

                Hi

                 

                If you achieve requirement, pls close this post by mark as assumed answer or correct answer..

                  • Re: Load help text of objects
                    Sabrina Richter

                    Well, I know where to find the help texts in the objects. What I really wanted was an analysis of all help texts in all objects of the document.

                    A table like SheetName - ObjectName - HelpText.

                    With the Document Analyzer of Rob Wunderlich I can get the first two columns but I need to know how to load the helptexts ...

                      • Re: Load help text of objects
                        Gysbert Wassenaar

                        You can do it with a macro. Here's an example that simply the ObjectID and its help text:

                         

                        sub GetHelpText

                         

                        msg = ""

                        Objects = ActiveDocument.ActiveSheet.GetSheetObjects

                         

                            For i = lBound(Objects) To uBound(Objects)

                         

                            OT = Objects(i).GetObjectType

                            OID = Objects(i).GetObjectID

                            set prop = Objects(i).GetProperties

                         

                            Select Case OT

                                Case 1,2,3,4,6,7,8,9,18,34,35

                                    msg = msg & OID & " " & prop.Layout.Frame.HelpText.v & chr(10)   

                                Case 10,11,12,13,14,15,16,20,21,22,23,27,28

                                    msg = msg & OID & " " & prop.GraphLayout.Frame.HelpText.v & chr(10)

                                Case 5,19

                                    msg = msg &  OID & " " & prop.Frame.HelpText.v & chr(10)   

                                Case else

                            End Select

                           

                            next

                         

                        msgbox msg

                         

                        end sub

                         

                         

                        Note! I haven't checked every chart type (object types 10,11,12,13,14,15,16,20,21,22,23,27,28), but I expect they all use the same interface and that the above works for all chart types.

                          • Re: Load help text of objects
                            Sabrina Richter

                            Hi,

                             

                            this macro is what i searched. I worked on the Document Analyzer the same time and found out that it creates XML-files with all properties of all objects a temporary folder. I just included these files in the analyzer like:

                             

                            for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
                            Object_Properties:
                            LOAD DISTINCT
                                text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname
                            FROM $(File);
                            next File;
                            
                            
                            
                            for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
                             join (Object_Properties) LOAD 
                                text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname,
                                [Layout/Frame/HelpText/v] as Helptext
                            FROM $(File) (XmlSimple, Table is [QVObjects/TableBoxProperties]);
                            next File;
                            
                            
                            for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
                             join (Object_Properties) LOAD 
                                left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4) as Objectname,
                                [GraphLayout/Frame/HelpText/v] as Helptext
                            FROM $(File) (XmlSimple, Table is [QVObjects/GraphProperties]);
                            next File;
                            
                            
                            left join (Object_Properties)
                            LOAD
                            Objectname,
                            Objectname as ObjectId
                            Resident Object_Properties;
                            

                             

                            in the Clean-up register in Script. Then you can create a table which shows the helptext for every object easily.

                             

                            Thanks for your help everyone.

                          • Re: Load help text of objects
                            Deepak Vadithala

                            Hi Richters,

                             

                            I understand that you are going to use the Help Text for documentation and are you using this for expressions/calculations? If yes, I prefer different approach to maintain the Help Text. I understand that I'm not providing a solution for your question but just giving something to think about...

                             

                            • Always write your expressions in Variable and create these variables & expression in script
                            • Comment your expressions/variables something like this...

                                     Let v_Exp_TotalSales          =     Sum(Sales)     //Using Sales filed to calculate total sales...blah blah blah

                            • Now you can use Subfield function and use the variable to extract the Help Text

                             

                            This means you can have your Help Text in one place and if you are developing multiple applications with same calculations then you can store this QVW calculation file and call it whenever you need. It's easy to maintain and update only one place. And finally you can easily export the script and variables to get the calculations and Help Text. Just trying to mimic Object Oriented Programmings!!

                             

                            I hope this helps!

                             

                            Cheers,

                            DV

                             

                            www.QlikShare.com