API Reference > OdDb Classes > OdDbHostAppServices Class > OdDbHostAppServices Methods > readFile Method > OdDbHostAppServices::readFile Method (OdString&, bool, bool, Oda::FileShareMode, OdPassword&)
OdDbHostAppServices::readFile Method (OdString&, bool, bool, Oda::FileShareMode, OdPassword&)
Syntax
C++
virtual OdDbDatabasePtr readFile(const OdString& filename, bool allowCPConversion = false, bool partialLoad = false, Oda::FileShareMode shareMode = Oda::kShareDenyNo, const OdPassword& password = OdPassword());
Parameters 
Description 
const OdString& filename 
[in] Path of the DWG/DXF file to read.  
Oda::FileShareMode shareMode = Oda::kShareDenyNo 
[in] Sharing mode to use when opening the file. 

Loads the contents of the specified StreamBuf or DWG/DXF file into the database with which this HostAppServices object is associated. 

 

shareMode must be one of the following: 

 

Name 
Value 
Description 
Oda::kShareDenyReadWrite 
0x10 
deny read/write mode 
Oda::kShareDenyWrite 
0x20 
deny write mode 
Oda::kShareDenyRead 
0x30 
deny read mode 
Oda::kShareDenyNo 
0x40 
deny none mode 
Copyright © 2002–2020. Open Design Alliance. All rights reserved.