Manipulate Document Packs

Each Document Pack is represented by a directory in the session directory.

You can copy the active Document Pack with the command CopyDocumentPack. Optionally, the copy can be activated, abandoning the old active Document Pack. Also, you can use the command CopyDocumentPack to remove certain content from the copy. However, such a copied Document Pack (with some content being removed) cannot be submitted to KCM ComposerUI for interactive modification. For more information, see CopyDocumentPack.

You can reactivate a Document Pack using the command CreateDocumentPack with the name of the directory. Create a Document Pack.

The following examples show the workflow for creating a copy of a Document Pack for manipulation.

Setup the Document Pack.

 CreateDocumentPack Name ("pack");

Generate content for the Document Pack.

 ITPRun … Result (_document_pack);

Create a scratch copy and activate it, deactivating the original Document Pack.

CopyDocumentPack NewName ("scratch-copy")Switch (True);

Perform operations on the copy, then save and clean up.

SaveDocumentPack File
("my-modified-copy.zip"); 
CloseDocumentPack;

Reactivate the original Document Pack.

 CreateDocumentPack Name ("pack");