public void Save()
public void Save()
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. |
// API was initialized before... // Get API instance and open a project. HpdApi api = HpdApi.GetInstance(); Project project = api.OpenProject("path to a project"); // Create new variant. project.CreateVariant("My new variant name"); // Save and close the project. project.Save(); project.Close();