InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpImportExportSnippet Class Reference

Public Member Functions

ErrorCode ExportTaggedContentItem (const UIDRef &contentUIDRef, const IDFile &whereTo)
 
ErrorCode ExportInCopyInterchangeToFile (const UIDList &uidList, const IDFile &idFile, INXOptions options)
 
ErrorCode ExportPageitemsToFile (const UIDList &uidList, const IDFile &idFile)
 
ErrorCode ImportToSpreadElement (const UIDRef &documentUIDRef, const IDFile &snippetFile, int32 whichSpread=0)
 
ErrorCode ImportToElement (const UIDRef &domElementUIDRef, const IDFile &snippetFile)
 
ErrorCode ImportXMLElements (const UIDRef &docUIDRef, const IDFile &whereFrom, const XMLReference &whereTo)
 
ErrorCode ImportXMLElementsToRoot (const UIDRef &docUIDRef, const IDFile &whereFrom)
 

Detailed Description

Code that demonstrates snippet import and export using the ISnippetExport interface.

Member Function Documentation

ErrorCode SnpImportExportSnippet::ExportInCopyInterchangeToFile (const UIDListuidList,
const IDFileidFile,
INXOptions options 
)

Export an InCopy Story to a file.

Parameters
uidListlist of objects, IDOMElement can be instantiated from each
idFilewhere to export to
optionsINXOptions (traditional or expanded)
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ExportPageitemsToFile (const UIDListuidList,
const IDFileidFile 
)

Export UIDList of Page Items to a file

Parameters
uidListlist of objects, IDOMElement can be instantiated from each
idFilewhere to export to
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ExportTaggedContentItem (const UIDRefcontentUIDRef,
const IDFilewhereTo 
)

Export an XML-tagged content item (in the layout) to specified path as a snippet

Parameters
contentUIDRef
whereTo
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ImportToElement (const UIDRefdomElementUIDRef,
const IDFilesnippetFile 
)

Import as child of given scripting DOM element, IDOMElement

Parameters
domElementUIDRefspecifies document of interest
snippetFile
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ImportToSpreadElement (const UIDRefdocumentUIDRef,
const IDFilesnippetFile,
int32 whichSpread = 0 
)

Import a snippet as a child of a specified spread

Parameters
documentUIDRefspecifies document of interest
snippetFile
whichSpreadspread index, zero based, within spreadlist (ISpreadList)
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ImportXMLElements (const UIDRefdocUIDRef,
const IDFilewhereFrom,
const XMLReferencewhereTo 
)

Import XML elements in snippet into logical structure

Parameters
docUIDRefspecifies document of interest
whereFromsnippet file
whereTolocation in logical structure from which IIDXMLElement can be instantiated
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise
ErrorCode SnpImportExportSnippet::ImportXMLElementsToRoot (const UIDRefdocUIDRef,
const IDFilewhereFrom 
)

Import XML elements in snippet into root of logical structure

Parameters
docUIDRefspecifies document of interest
whereFromsnippet file
Returns
ErrorCode kSuccess on success, other ErrorCode otherwise