Parameters
- name
- Name of the project.
- templatePath
- Path to the template file.
- location
- Location of the new project directory.
Return Value
Path to the created project.
Exception | Description |
---|---|
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.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.DirectoryNotFoundException | This directory was not found. |
EPLAN.Harness.API.Exceptions.FileExtensionException | The exception that is thrown when the file has the wrong extension. |
EPLAN.Harness.API.Exceptions.FileNotFoundException | This file was not found. |
EPLAN.Harness.API.Exceptions.OperationFailedException | Project was not created. |
// API is already initialized. HpdApi api = HpdApi.GetInstance(); string template = @"Path to a template file (*.hxpt)"; string newProjectPath = api.CreateProjectFromTemplate("NewProjectName", template, @"Location...");
// API is already initialized. HpdApi api = HpdApi.GetInstance(); string template = @"Path to a template file (*.hxpt)"; string newProjectPath = api.CreateProjectFromTemplate("NewProjectName", template);