6 Replies Latest reply: Jun 27, 2014 3:51 PM by Carlos Alberto Agudelo Duque RSS

    How to import document layout

    Erich Shiino

      Hi,

       

      How can I import a document layout?

      I'm using QV 11 SR1.

      I opened a qvw and use menu file -> Export -> Export Document layout

      - > QV created hundreds of xml files, one for each object and a few more.

       

      Then, I created another qvw and tried to import that layout using menu file -> Import Diocument layout

      There, even if I point at the right folder, QV doesn't recognize the files.

       

      If I make it list all the files ( *.*) and choose any .xml, nothing happens

       

      Any clues?

      Any help will be appreciated.

       

      Best Regards,

      Erich

        • Re: How to import document layout
          Erich Shiino

          Anyone? Could it be a bug?

            • Re: How to import document layout
              Rob Wunderlich

              Not a bug, but a matter of confusing menu options between versions.

               

              QV9 introduced the Export Document Layout option to export the layout to a single xml file. This function of this menu option was changed in QV10 -- more on that later.

               

              The Import Document Layout menu option in QV9/10/11 inputs a single xml file created by the QV9 Export Document Layout menu. This QV9 style file can also be created in QV10/11 with the macro API call:

              ActiveDocument.ExportLayoutFile("myfile.xml")

              So if QV11, that is the only way you can create an xml file that can be imported by the Import Document Layout menu option.

               

              In QV10/11, the Export Document Layout menu option was changed to create a set of xml files. These are the same files as created by the documentname-prj folder automatic method. So when you use the Export option in those QV10/11, the parameter is a directory name and the output is a set of xml files, one for each sheet object and document properties etc. There is no menu option in QV10/11 to import those exported files.

               

              In QV10/11, you use the -prj method to import a set of xml document files. For example:

               

              1. Use Export Document Layout to export to a directoty named "myapp-prj"

              2. Copy a qvw -- any qvw to the directory above the "myapp-prj" directory.

              3. Rename the copied qvw "myapp.qvw". It must match the directory name minus the "-prj".

              4. Open myapp.qvw and it will automatically populate from the contents of the myapp-prj directory below it.

               

              So the Import Document Layout menu option only exists to load a QV9 style single xml file -- for backwards compatibility. There is no menu option to load the QV10/11 style multiple files. This multiple file style is only loaded automatically using the automatic "-prj" naming convention.

               

              -Rob