---
title: "newProject"
slug: "api/project/operations/newproject"
sidebar:
  order: 600
---

<a id="ref-1a2893effc48"></a>
<a id="ref-d30ab7498981"></a>
<a id="ref-5fd1aef1f68c"></a>

## Synopsis

```text
void newProject(
    string sessionId,
    string projectGroup,
    string priceList
)
```

Instead of a session ID the operation can also be invoked with a session context ID as their first argument (see also §[newSessionContext](/pCon/configuratorOnline/specs/api/session/operations/newsessioncontext#ref-71351064821d)). If so, the session ID stored in the session context will be used as the actual session ID. When invoked with a session context ID, the operation sets the project key of the session context to the key of the new or loaded project, but never close the session context's old 'current project', regardless of whether it had been identified by a project key stored in the session context or, in the absence of such a key, was (and remains) the session's current project.

On the other hand, if these operations are invoked with a session ID, and if the new project can be created or loaded successfully, then the new project will always become the session's current project, and the old current project is always closed, regardless of whether there is a session context referencing this project. If there is such a session context, operations invoked for this session context will subsequently fail if they require a valid project until the project key of the session context has been reset or is set to the key of one of the projects currently held open by the session.

The price list, if specified, must be available for the project group. If not specified, the project group must either have no associated price list, in which case the project continues to use the session's current configuration, or exactly one price list. If a price list has been determined for use, and the price list specifies a startup file, then the current session configuration is replaced with the configuration read from the startup file and the new project will use this configuration. Otherwise (price list specifies no startup file)  the new project continues to use the current session configuration.

Loading a new session configuration and replacing the current project with a new empty project is an atomic operation (except in case of errors caused by bugs in the implementation).

For a given project group and price list. The operation fails without further action if:

   - The specified project group does not exist
   - No price list has been specified and the project group supports multiple price lists
   - A price list has been specified, but the project group does not have the specified price list
   - The project group has been configured for automatic generation of project numbers and generation of a new project number fails for whatever reason.
