This is the API for using the Snippets plug-in to generate (export) XML in INX format. You can use this to write objects out to INX, and you can use ISnippetImport to read them in from INX. These functions will write out the specified objects, as well as whatever dependent objects they rely on. So, for instance, if it writes out a page item, it will also write out any swatches used in the page item.
Access this interface via the Utils<> helper.
- See Also
- ISnippetImport
- Utils
Export the application preferences to a stream. You can specify which elements you want exported by passing the appropriate ScriptIDs in the preferenceIDs parameter.
Script IDs can be found in ScriptingDefs.h. In ScriptingDefs.h, most list style elements will have a singular identifier and a plural identifier, such as c_DocumentStyle and c_DocumentStyles. In all cases, you should pass in the singular version, i.e. c_DocumentStyle.
Many preferences can have dependencies on other preferences. i.e. Character and Paragraph styles have references to colors in them. If you are exporting Character and Paragraph styles, you should also export colors, swatches, gradients, etc. or use extreme caution.
- Parameters
| stream | - XML will be written to this output stream |
| operation | - indicates whether the ScriptIDs in 'preferenceIDs' should be the only ScriptIDs included in the export, by specifying PreferenceOperation::kInclude, or whether the ScriptIDs in 'preferenceIDs' should be excluded, by specifying PreferenceOperation::kExclude, from the standard list of preferences that get exported i.e. if we wanted to export only the list of document presets and the Margin preferences, we would add c_MarginPref and c_DocumentStyle to our preferenceIDs and set operation to kInclude. If we wanted to write out all the prefs except Object Styles, we would add c_ObjectStyle to our preferenceIDs and set operation to kExclude. |
| preferenceIDs | - |
- Returns
- ErrorCode kSuccess if it worked