CDCopyDocument

Applies To:

ChemDraw Menu Extensions Interface:  Access Functions

Description:

Provides a copy of the complete contents of the given document.

Syntax:

long CDAPI CDCopyDocument( long documentToken,
                                                       DataFormatType selectionFormat,
                                                      HANDLE *CDIFSelection
);

documentToken a document token representing the document of interest, as provided to the DLL in a GetSubmenuItemName, GetSubmenuItemState or DoSubmenuChoice call.
selectionFormat the format in which the copy of the document contents should be provided.
CDIFSelection a pointer to a handle containing the document contents in the requested format; may be NULL if an error occurs.

Returns a long indicating success (0) or failure (!0) of the function.

Remarks:

The CDIFSelection parameter should not be confused with the document's current selection.  In this case, CDIFSelection is the complete contents of the document.

The selectionFormat parameter can be one of the following supported data formats:

  • kChemDrawScrapDataType  // ChemDraw 3.5 clipboard format
  • kMolFileDataType
  • kCDIFDataType                   // CDX clipboard format
  • kF1DataType
  • kF1QueryDataType
  • kRXNDataType
  • kSketchDataType
  • kSmilesDataType


2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email   info@cambridgesoft.com
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA

This function must have ordinal number 7 in the Import Definition File.

When the DLL is done using the handle, it must be returned to ChemDraw using CDReturnHandle.

If an error is returned, the DLL may call CDGetApplicationErrorString for a string explaining the error.

Example:

See Also:

GetSubmenuItemName, GetSubmenuItemState, DoSubmenuChoice
CDGetApplicationErrorString, CDReturnHandle


2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email   info@cambridgesoft.com
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA