Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Project Class / Save Method
Example
In This Topic
    Save Method (Project)
    In This Topic
    Save the project. Does not save changes made on documents themselves.
    Syntax
    public void Save()
    Exceptions
    ExceptionDescription
    The object is in invalid state. Obtain a new one.

    Internal error of HpD or HpD API.

    IMPORTANT: Throwing this exception changes HpD Api's state to Failed.

    Remarks
    To save changes inside of documents, use Save. You want to use Save however, if you have added or deleted a document or changed a project structure in any other way.
    Example
    // 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();
    See Also