---
title: "setCurrentProject"
slug: "api/project/operations/setcurrentproject"
sidebar:
  order: 582
---

<a id="ref-c6c8a5aa8adc"></a>
<a id="ref-d33f84df25c5"></a>
<a id="ref-85ea67ee3c3f"></a>

## Synopsis

```text
void setCurrentProject(SessionId sessionId,
    UUID projectKey,
    boolean?  replaceOnly)
throws ProjectServiceFault;
```

See also: [`SessionId`](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [`UUID`](/pCon/configuratorOnline/specs/guide/web-service-interfaces/common-type-definitions/uuid)

Set the session's current project to the project specified by the given project key, and close the old current project unless both projects are the same (instances in memory) or argument `replaceOnly` has been specified as true.

Argument `projectKey` must reference one of the projects currently held open by the session.

Argument `replaceOnly`, if not specified, defaults to `false` (i.e. the old current project, if different from the new one, is not only replaced, but also closed).
