Parameters
- filename
- Path to the HpD project file
Return Value
Project object
Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.ProjectAlreadyOpenedException | Only one project can be opened at a time. Close CurrentProject and try it again. |
EPLAN.Harness.API.Exceptions.HpdApiNotInitializedException | Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it. |
EPLAN.Harness.API.Exceptions.InternalErrorException | Unexpected error in HpD. |
EPLAN.Harness.API.Exceptions.ArgumentException | Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property. |
EPLAN.Harness.API.Exceptions.FileNotFoundException | This file was not found. |
EPLAN.Harness.API.Exceptions.FileLockedException | File you are trying to open is locked by another user. |
EPLAN.Harness.API.Exceptions.DocumentVersionException | Document was saved with an unsupported version of HpD. |
EPLAN.Harness.API.Exceptions.FileExtensionException | The exception that is thrown when the file has the wrong extension. |
If any problem occurs when connecting to the project's active library (for example: wrong version of library) the library will be disconnected. Check project's property EPLAN.Harness.API.Projects.Documents.Project.ActiveConnection if isn't a null reference (Nothing in Visual Basic). For detailed information about what was wrong, see the LOG file or try reconnecting the library using EPLAN.Harness.API.Projects.Documents.Project.ConnectToLibrary. You'll then get the relevant exception.