Exception | Description |
---|---|
EPLAN.Harness.API.Exceptions.ObjectInvalidException | The object is in invalid state. Obtain a new one. |
EPLAN.Harness.API.Exceptions.InternalErrorException | Internal error of HpD or HpD API. IMPORTANT: Throwing this exception changes HpD Api's state to Failed. |
System.ArgumentNullException | The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument. |
// Open project. HpdApi api = HpdApi.GetInstance(); Project project = api.OpenProject("path to a project"); // Get current preview of the project. Image preview = project.Preview; // Set an image as new preview of this project. project.Preview = Bitmap.FromFile("path to an image"); project.Save();