Home > Working with SGWorld > Project (IProject6) > Open
Opens a FLY file or terrain database. Open passes the user name and password for the terrain database opened. In addition, Open can work in synchronous or asynchronous mode. In synchronous mode the method returns after the file is loaded. In asynchronous mode, the method returns immediately. You can then use ISGWorld6.OnLoadFinished() to be notified when the file is loaded .
JavaScript |
|
Open( ProjectURL, Asynchronous, User, Password ) |
C# |
|
void Open( string ProjectURL, bool Asynchronous = false, string User = "", string Password = "") |
C++ |
|
HRESULT Open( BSTR ProjectURL, VARIANT_BOOL Asynchronous, BSTR User, BSTR Password) |
Parameters
ProjectURL
A full pathname or a URL of a FLY file to be loaded by TerraExplorer. You can also load a local terrain database file by using a full pathname to an MPT file, or a terrain database from TerraGate by following the format: “TerrainDatabse.Type@TerraGateAddress:PortNumber” (e.g., washington-dc.mpt@tgate.skylinesoft.com).
Asynchronous
When set to TRUE, the method executes asynchronously, meaning returns immediately. When set to FALSE, the method executes synchronously.
User
File’s security user name. If the file is not secure, the user name is ignored.
Password
Security password for the specified user. If the file is not secure, the password is ignored.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.