API Reference > OdDb Classes > OdDbDatabase Class > OdDbDatabase Methods > readFile Method > OdDbDatabase::readFile Method (OdStreamBuf*, bool, OdDbAuditInfo *, OdPassword&, bool)
OdDbDatabase::readFile Method (OdStreamBuf*, bool, OdDbAuditInfo *, OdPassword&, bool)
Syntax
C++
void readFile(OdStreamBuf* pStreamBuf, bool partialLoad = false, OdDbAuditInfo * pAuditInfo = 0, const OdPassword& password = OdPassword(), bool allowCPConversion = false);
Parameters 
Description 
OdStreamBuf* pStreamBuf 
[in] Pointer to the StreamBuf object from which the data is to be read.  
bool partialLoad = false 
[in] Controls the partial loading of .dwg files.  
OdDbAuditInfo * pAuditInfo = 0 
[in] Pointer to an OdDbAuditInfo object.  
const OdPassword& password = OdPassword() 
[in] Password for file.  
bool allowCPConversion = false 
[in] If and only if true, allows code page conversion. 

Reads the contents of the specified StreamBuf object or file into this database object. 

 

Using this function in .tx code is not recommended. In .tx modules use OdDbHostAppServices::readFile() or OdDbHostAppServices::recoverFile() instead. This provides more control for host applications which can override these virtual methods. 

The specified OdDbAuditInfo object controls the audit and receives the audit status. 

If pAuditInfo is non-zero, a recover will be performed instead of a load.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.