3 Replies Latest reply on Jan 28, 2010 1:39 AM by PeterPow

    icml export

    PeterPow

      Hello Guys,

       

      we are using the new idml format to edit text inside of textframes. Everything works fine except the fact, that an icml-export of a story with the following export settings

       

      app.incopyExportOptions.includeAllResources = true;

      app.incopyExportOptions.includeGraphicProxies = true;

       

      does not contain any information about the document object styles. This is a little bit annoying, because all other resources like character styles, paragraph styles, xml tags, cross references... are nicely listed in the resulting xml, whether or not they are used by the current object. Is there a reason why this information is missing or is there a way to activate the export of object styles to the icml?

      Thanks in advance!

          Peter

        • 1. Re: icml export
          Harbs. Level 6

          You can export a snippet which should have all the info you want.

           

          It does make sense that icml files do not contain info on object styles, because that's not editable in InCopy...

           

          Harbs

          • 2. Re: icml export
            PeterPow Level 1

            Hello Harbs,

             

            thanks for the quick answer (as usual )

             

            well your point is a good one, but if the object contains other objects with applied object styles, the information is available in the icml. Wouldn't it be more useful to always place this information inside it?

            The snippet export unfortunately does not contain all information but only the ones needed for the current object. Is there an option to export a snippet file with all resources as the incopy export allows us to?

            What i am trying to do is to export all resources at once to be able to recreate the idml structure of a textframe where only the content of the story itself is stored in a database, instead of storing the whole idml for each textframe. Maybe you have a good suggestion how this can be achieved.

            Thanks

            • 3. Re: icml export
              PeterPow Level 1

              Hello,

               

              for everybody who faces the same problem, here is my solution:

               

              to get all object styles inside an icml file I placed a temporary textFrame in the document and added inline textFrames for every object style in the document. Here is the code:

               

                      var textFrame = myDoc.pages.firstItem().textFrames.add();
                      for(var i = 0; i < myDoc.allObjectStyles.length; i++){
                        var newTextFrame = textFrame.insertionPoints.firstItem().textFrames.add();
                        newTextFrame.appliedObjectStyle = myDoc.allObjectStyles[i];
                      }
                      // Export the IDML here .....
                      textFrame.remove();

               

              Nevertheless I think it would be better if the object styles would be exported without those hacks when the "    app.incopyExportOptions.includeAllResources" parameter is set to "true".