Arbortext Command Language > Functions by Alphabetical Listing > doc_clone
  
doc_clone
doc_clone (doc[, flags[, viewchgtrk]])
This function creates an independent copy of the document specified by the doc parameter. This function returns a document identifier that may be subsequently called by other functions.
The following flags can be set:
0x01 — No content will be cloned. This will result in an empty document.
0x02 — Resolve any change tracking markup according to the value of the set viewchangetracking option for the current view of the specified document. If there is no view setting associated with the specified document, this function uses the global value of set viewchangetracking. The set viewchangetracking values interacts with this function in the following ways:
original — The cloned document will have the original markup (changes not applied) but no change tracking markup.
changesapplied — The cloned document will have the latest markup (changes applied) but no change tracking markup.
changeshighlighted — The cloned document will have the change tracking markup (no data is lost; changes are still tracked).
0x04 — Makes the empty document not inherit entity declarations from the source document. Applied only if 0x01 is also set.
0x40 — The cloned document will have the same name as the source document.
Without 0x40 set, the cloned document will have no name. You can use the doc_dir function to obtain the path to the cloned document.
* 
Avoid using the doc_set_path function to provide a path identical to the source document, because any subsequent changes made to either document will be reflected in the other document.
The optional viewchgtrk parameter can override the current setting of the set viewchangetracking option.