Import Method

Applies To:

Document object


Imports Structure Data (SDFiles) and Reaction Data (RDFiles) files directly into a database.


Document.Import ( BSTR/String importFilename,BSTR/String targetFilename, 
BSTR/String logFilename, CFTargetAction targetAction, 
CFDuplicateAction duplicateAction
Name and path of file to import.
targetFilename Destination database for incoming data.
logFilename  Name of text log file that records all additions and deletions during  importing.
targetAction One of three modes of importing into target.
duplicateAction If a structure being imported is already on file in the target database, one of the three values tells ChemFinder what to do.


targetAction values:


Adds imported data to end of existing database without changing pre-existing data.


Combines imported and pre-existing data.


Replaces existing data with imported data.
duplicateAction flags:


Concatenates incoming and pre-existing text data. This option is not available for numeric data; incoming numeric data always replaces existing.


Replaces only existing data of the same type as incoming data. Existing data of other types remain untouched.


Ignores any incoming data of same type as any existing data. Existing data of same type remains untouched.


The following VB code would be typical:

Dim FinderDoc As Object    'Document
Dim ImportFile As String      'Input file
Dim LogFile As String          'Import log
Dim TargetFile As String      'Target database

ImportFile = "D:\Program Files\ChemOffice\ChemFinder\samples\sample.sdf"
LogFile = "D:\Program Files\ChemOffice\ChemFinder\samples\Sample.log"
TargetFile = "D:\Program Files\ChemOffice\ChemFinder\samples\sample.mdb"

FinderDoc.Import ImportFile, TargetFile, LogFile, kCFMerge,                     kCFSkipData

'Code required to create FinderDoc is omitted

See Also:

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