> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::Project::Project Class Reference

Base class for [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) API, also see [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md).

`#include "Project.hpp"`

Inheritance diagram for ansys::Project::Project:

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=b63489f309bdcdca831017ff8dcd99e8)

## Classes

| Type | Name |
| - | - |
| struct | [CheckProjectInfo](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/structansys_1_1_project_1_1_project_1_1_check_project_info.md) Utility structure for VisitorCheckProject project checking action. |

## Public Member Functions

| Type | Name |
| - | - |
| | [Project](#ae26ec5c1449c349cc767bdae9deb4339) () Constructor. |
| virtual | [\~Project](#af534abc0e2d1096eab9228880f007688) () Destructor - Will close the project and release the lock (if any). |
| bool | [isLoaded](#a191c8a3067fcd15685409d5102c6f3b0) () const Indicates if a project is currrently opened (or newly created with success). |
| virtual bool | [isProject](#a1c91ce45672d515fa7c6f424506a3435) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation) Check if a filename is a project file (fast read, not entirely checked) |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [newProject](#a747d6326df2792b9830c54daf538071b) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation) Create a project at the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md). |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [openProject](#a20e00fbfad7b9823356b635a18a701b3) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation, bool pReadOnly=false) Open a project at the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md). |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [openProjectFromString](#a100dd4edabdd2f988cd4b7921ba597e5) (const std::string \&pData, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pProjectLocation, bool pReadOnly=false) Open a project by reading its data from a string. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [saveProject](#a5c10d316ae316b4e77b77707986115d5) () Save the currently opened project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [saveProjectToString](#aff3afe814f2bc3189971d237f31b8543) (std::string \&pString) Save the currently opened project to an XML string. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [saveAsProject](#a5030299e80c55a495dc39dc31ccc6692) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation, bool pFlagCopyFiles=false, bool pFlagCopyExternal=false) Save the project index file to a new location. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [exportProject](#af431224de932d828ab1d824978d4caa0) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation, bool pFlagCopyExternal=true, bool pFlagEnforceStructure=false) Export the project to a new location (keeping current project opened and unchanged). |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [archiveProject](#a0c8749326d29338aac4be6c06a49570f) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pTargetArchive) const Compress the project to an archive (keeping current project opened and unchanged) |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [archiveProject](#a2f486b3e690db9742eab5a2775d0b74d) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pTargetArchive, const std::vector\< std::string > \&pListIgnore) const Compress the project to an archive (keeping current project opened and unchanged) |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [forkProject](#ac3f62102beca5155952fcf14114ef98c) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pIter, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pNewProjectFilename, [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) \*\&pProject) Split the project at the specified location to a subproject. |
| bool | [isSubProject](#a6b805c7b989591d883a96b7c59e1dd74) () const |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [loadSubProject](#a95f212b1ae0044de8b53d21a08e2ee0e) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pIter) Load the specified subproject. |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) > | [getSubProjects](#acd6ec65e720da76f11e297f60a74e3bc) () Return the list of subprojects stored in the project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [loadAllSubProjects](#aa954c845eaa067de83e84a20e349e3b3) () Load all subprojects stored in the project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [join](#a3ebf27d2961a0be568411e4681e8be95) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) pIter) Join the subproject back to the master project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [getProjectLockInfo](#a1551943e6a65f018080a31a4bcdf1b80) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation, std::string \&pLockInfo) Indicates if the specified project is locked and retrieve the lock information. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [eraseProjectLock](#a37831e1a7dc4360781de4a9c44b88d5b) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pLocation) Erase the project lock. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [checkProject](#a9926355c9f869546253870307d4c3f2a) ([CheckProjectInfo](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/structansys_1_1_project_1_1_project_1_1_check_project_info.md) \&pSettings) const Check if a [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) is valid. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [upgradeProject](#aeeb9331e9e1324ba6fa24e84515df312) () Upgrade project to current version. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) | [copyItemTo](#a1c8960088174c3f898449c35d492367c) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) pSource, [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) \&pTarget, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) pTargetFolder=[Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md)(), bool pRecursive=false) Copy the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) item to the target project. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [closeProject](#a940472a5df9b1275453c6880c68fb156) () Close the project and release the lock. |
| const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) & | [getProjectLocation](#a68e78169e875091055df1ea930bb1ac9) () const Get the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project file with path. |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) | [getProjectFolder](#aa27f007a5fbbd5fd099cb681b6f3f186) () const Get the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project folder, if enabled by policy. |
| [ProjectStoragePolicy](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project_storage_policy.md) & | [getStoragePolicy](#a554127e81daa6f0836dffcf33d17988c) () Return the StoragePolicy for the current project or to configure before [newProject()](#a747d6326df2792b9830c54daf538071b). |
| const [ProjectStoragePolicy](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project_storage_policy.md) & | [getStoragePolicy](#a90358d6f0f9d9ae05b019470cc05a6c4) () const |
| bool | [isLocalToProject](#a2dd72e4e00fc697566aa919c184b038e) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pURL) const Indicates if the specified absolute [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is inside the project folder. |
| bool | [isOwnedByProject](#a46877c6320f47a155a75169d36238949) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pURL) const If the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is a file in the project folder, and registered, returns true. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) | [getIteratorForURL](#af7698dfb8ecc0eedf251d8f0f30abb70) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pURL) const If the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is a file in the project folder, and registered, returns the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md). |
| [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) | [getRelativePathToFile](#a718a7912d243d9ec683e0006f161dd72) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pURL) const Future feature - Not available. |
| bool | [registerCallback](#a5aabe52873c70c358b5676d7a040a9d5) (const std::string \&pOwner, const std::string \&pCallbackName, BaseCallback \*pCallback) Register a function callback to a project event. |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [executeCallback](#ad29b2f43e54a442e3c2aae16bfde9c05) (const std::string \&pCallbackName, CallbackParams \&pParams) Trigger any registered callback for this callback ID. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [copyMetadata](#a6891faa06d30ec30f3b47b53072034a1) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pSource, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pTarget) const Copy all metadata values from source to target iterator. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [copyRuntimeMetadata](#a6abcade6d718d29916f6daabe1f3d6ea) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pSource, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pTarget) const Copy all runtime metadata values from source to target iterator. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [getInheritedMetadata](#a1de046a523c12e7e7c50aba05ba74e1e) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pIter, [MetadataConst](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_metadata_const.md) \&pMeta) Return the metadata for the current iterator and include relevant data from parent iterators. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) | [getDir](#a1acd31edcdcacab8c3e8640c9e87923f) () |
| bool | [setDir](#ad204f23d657a51f9b9eaa486544f20c3) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) \&pDir) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) | [root](#a4d37d37587ca061d9cd7a4e10d0fc099) () const Return the iterator to the project root folder. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) | [get](#a7e8b3e5b9ea8fcf583b9bff9e887dc09) (const [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_path.md) \&pPath) const For a project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_path.md), return the associated [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md). |
| int | [getProjectId](#a551f309b90cf9f495420ea02848cbf4d) () const Return a project id, which will be the same as in the matching [Iterator::getProjectId()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md#aab5adc1caad321f18f6f2cdb2d7eb6e2). |

## Static Public Member Functions

| Type | Name |
| - | - |
| static [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [unarchiveProject](#a336ac0d006d6a24a08f1894c66e33940) (const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pArchive, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pTargetFolder) Extract the project to an from an archive,. |

## Protected Member Functions

| Type | Name |
| - | - |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [updateFromPolicy](#a276124462f413269f64dc33d70c9257a) () |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [setupNewProject](#a6a9567588ffe6e0d6207cfaa743f2fa0) () |
| virtual [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) \* | [projectObjectFactory](#a5e93913e59ac2ba3e0a6fad5a4ef667a) () const Create a new object of the current effective project type. |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) | [copyProjectContent](#afe6dccd1d416c6e84967a68107af8515) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) pFolder, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pSourceFolder, const [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) \&pTargetFolder, std::map\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md), [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) > \&pURLChanges, bool pCopyExternalFiles, bool pEnforceStructure) Internal function - Copy a folder iterator content files from a source directory to target. |

## Static Protected Member Functions

| Type | Name |
| - | - |
| static std::string | [getReleaseId](#acac291a635b82a5f2950222963905f02) () |

## Static Protected Attributes

| Type | Name |
| - | - |
| static int | [sFormatVersion](#a3192d4bfc37c3510616854092b4608f6) = 2 |

## Detailed Description

Base class for [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) API, also see [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md).

To use the concepts of [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_simulation.md), [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_run.md), [Output](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_output.md), and [Result](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_result.md), a [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md) should be used to create/load the files.

The [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) object is the low-level service, offering only the File, Folder, and Link capabilities.

The project concept is detailed in [Project API](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/_project_a_p_i.md).

## Constructor & Destructor Documentation

### Project()

```cpp theme={null}
ansys::Project::Project::Project()
```

Constructor.

A project should be created/opened with [newProject()](#a747d6326df2792b9830c54daf538071b)/openProject() Before creating a project, the storage policy should be set up, to configure whether the new project should be a free-storage or a managed project. See [getStoragePolicy()](#a554127e81daa6f0836dffcf33d17988c).

### \~Project()

```cpp theme={null}
ansys::Project::Project::~Project()
```

`virtual`

Destructor - Will close the project and release the lock (if any).

## Member Function Documentation

### archiveProject() \[1/2]

```cpp theme={null}
Error ansys::Project::Project::archiveProject(const URL & pTargetArchive) const
```

Compress the project to an archive (keeping current project opened and unchanged)

If the project is managed (project folder), flprj+folder are compressed If the project is free storage, all files referenced from project folder (in current or subfolders) are included. Files with global URLs or, relative [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) going up (../) will not be saved in the archive.

**Parameters**

| Name | Description |
| - | - |
| pTargetArchive | 7z file to write |

### archiveProject() \[2/2]

```cpp theme={null}
Error ansys::Project::Project::archiveProject(
    const URL & pTargetArchive,
    const std::vector< std::string > & pListIgnore
) const
```

Compress the project to an archive (keeping current project opened and unchanged)

If the project is managed (project folder), flprj+folder are compressed If the project is free storage, all files referenced from project folder (in current or subfolders) are included. Files with global URLs or, relative [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) going up (../) will not be saved in the archive.

**Parameters**

| Name | Description |
| - | - |
| pTargetArchive | 7z file to write |
| pListIgnore | list of file names or patterns to ignore |

### checkProject()

```cpp theme={null}
Error ansys::Project::Project::checkProject(CheckProjectInfo & pSettings) const
```

`virtual`

Check if a [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) is valid.

**Parameters**

| Name | Description |
| - | - |
| pSettings | [CheckProjectInfo](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/structansys_1_1_project_1_1_project_1_1_check_project_info.md) structure used to specify check project settings and return the results. |

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#a9d89fa7443d65f1e2ad3befee9da068d).

### closeProject()

```cpp theme={null}
Error ansys::Project::Project::closeProject()
```

Close the project and release the lock.

All Iterators to this project will become invalid and will be unusable (!ok()).

### copyItemTo()

```cpp theme={null}
Iterator ansys::Project::Project::copyItemTo(
    Iterator pSource,
    Project & pTarget,
    Iterator pTargetFolder = Iterator (),
    bool pRecursive = false
)
```

Copy the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) item to the target project.

This operation only copies the project index data, not the files themselves. The [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) pointed by the files is only valid if the new project is appropriately positioned.

### copyMetadata()

```cpp theme={null}
Error ansys::Project::Project::copyMetadata(
    const Iterator & pSource,
    Iterator & pTarget
) const
```

`virtual`

Copy all metadata values from source to target iterator.

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#a93f249fd03b7932c1ba5c83865f1c1b4).

### copyProjectContent()

```cpp theme={null}
Error ansys::Project::Project::copyProjectContent(
    Iterator pFolder,
    const URL & pSourceFolder,
    const URL & pTargetFolder,
    std::map< Iterator , URL > & pURLChanges,
    bool pCopyExternalFiles,
    bool pEnforceStructure
)
```

`protected` `virtual`

Internal function - Copy a folder iterator content files from a source directory to target.

**Parameters**

| Name | Description |
| - | - |
| pFolder | [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md) of a folder to copy. |
| pSourceFolder | Location of the storage for the folder. |
| pTargetFolder | Location of the storage for the new folder (folder must exist already). |
| pURLChanges | If Iterators would have their [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) changed by saving a project to the new location, this index is to be filled with iterators and their new [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) (setURL/getURL). In the case of a saveAsProject the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) changes are applied and kept, in the case of an export the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) changes are to be applied , the project saved, then restored. |
| pFlagCopyExternal | if enabled, external files and folders are copied to the new project location. if disabled, [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) references are kept as is. If a file is stored in a unregistered subfolder, the same file structure is copied to the target location. |
| pFlagEnforceStructure | The project is saved to a project folder and subfolders are enforced to their Simulation/Run names. |

### copyRuntimeMetadata()

```cpp theme={null}
Error ansys::Project::Project::copyRuntimeMetadata(
    const Iterator & pSource,
    Iterator & pTarget
) const
```

`virtual`

Copy all runtime metadata values from source to target iterator.

### eraseProjectLock()

```cpp theme={null}
Error ansys::Project::Project::eraseProjectLock(const URL & pLocation)
```

Erase the project lock.

**Parameters**

| Name | Description |
| - | - |
| pLocation | [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project file. |

### executeCallback()

```cpp theme={null}
Error ansys::Project::Project::executeCallback(
    const std::string & pCallbackName,
    CallbackParams & pParams
)
```

Trigger any registered callback for this callback ID.

### exportProject()

```cpp theme={null}
Error ansys::Project::Project::exportProject(
    const URL & pLocation,
    bool pFlagCopyExternal = true,
    bool pFlagEnforceStructure = false
)
```

Export the project to a new location (keeping current project opened and unchanged).

This operation will copy/collate the files of the project.

**Parameters**

| Name | Description |
| - | - |
| pLocation | New location and name of the flprj file |
| pFlagCopyExternal | If enabled, external files and folders are copied to the new project location. If disabled, [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) references are kept as is |
| pFlagEnforceStructure | The project is saved to a project folder and subfolders are enforced to their Simulation/Run names. |

### forkProject()

```cpp theme={null}
Error ansys::Project::Project::forkProject(
    Iterator & pIter,
    const URL & pNewProjectFilename,
    Project *& pNewProject
)
```

Split the project at the specified location to a subproject.

The specified location (a folder iterator) becomes the new project root, and is linked as a subproject in the current project. A new project file is saved at the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) filename.

**Parameters**

| Name | Description |
| - | - |
| pIter | Folder iterator to split as a subproject. |
| pPrjLocation | Location/name of the project index file, if a blank [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is provided, it is saved alongside the target folder, with the default project filename suffix (.flprj). |
| pNewProject | A blank, properly typed, project object to use (if forking a [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md), use a [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md) target). |

### get()

```cpp theme={null}
Iterator ansys::Project::Project::get(const Path & pPath) const
```

For a project [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_path.md), return the associated [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md).

The [Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_path.md) is the internal project hiearchy, which might include hidden/virtual subfolders. To get the iterator from a file path on disk, see [getIteratorForURL()](#af7698dfb8ecc0eedf251d8f0f30abb70).

### getDir()

```cpp theme={null}
Iterator ansys::Project::Project::getDir()
```

### getInheritedMetadata()

```cpp theme={null}
Error ansys::Project::Project::getInheritedMetadata(
    const Iterator & pIter,
    MetadataConst & pMeta
)
```

`virtual`

Return the metadata for the current iterator and include relevant data from parent iterators.

In [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) this only returns the metadata for the current iterator, unless the parent item is a Transparent item, the data is then also included. Used in some UI elements.

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#af0007299e8f3e397ef30c8736a12d873).

### getIteratorForURL()

```cpp theme={null}
Iterator ansys::Project::Project::getIteratorForURL(const URL & pURL) const
```

If the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is a file in the project folder, and registered, returns the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md).

### getProjectFolder()

```cpp theme={null}
URL ansys::Project::Project::getProjectFolder() const
```

Get the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project folder, if enabled by policy.

### getProjectId()

```cpp theme={null}
int ansys::Project::Project::getProjectId() const
```

Return a project id, which will be the same as in the matching [Iterator::getProjectId()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_iterator.md#aab5adc1caad321f18f6f2cdb2d7eb6e2).

### getProjectLocation()

```cpp theme={null}
const URL & ansys::Project::Project::getProjectLocation() const
```

Get the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project file with path.

### getProjectLockInfo()

```cpp theme={null}
Error ansys::Project::Project::getProjectLockInfo(
    const URL & pLocation,
    std::string & pLockInfo
)
```

Indicates if the specified project is locked and retrieve the lock information.

**Parameters**

| Name | Description |
| - | - |
| pLocation | [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) of the project to check. |
| pLockInfo | string indicating the lock source, empty string if no lock |

**Returns**

[Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_error.md) if the lock info cannot be retrieved.

### getRelativePathToFile()

```cpp theme={null}
URL ansys::Project::Project::getRelativePathToFile(const URL & pURL) const
```

Future feature - Not available.

### getReleaseId()

```cpp theme={null}
std::string ansys::Project::Project::getReleaseId()
```

`static` `protected`

### getStoragePolicy() \[1/2]

```cpp theme={null}
ProjectStoragePolicy & ansys::Project::Project::getStoragePolicy()
```

Return the StoragePolicy for the current project or to configure before [newProject()](#a747d6326df2792b9830c54daf538071b).

### getStoragePolicy() \[2/2]

```cpp theme={null}
const ProjectStoragePolicy & ansys::Project::Project::getStoragePolicy() const
```

### getSubProjects()

```cpp theme={null}
std::vector< Iterator > ansys::Project::Project::getSubProjects()
```

Return the list of subprojects stored in the project.

### isLoaded()

```cpp theme={null}
bool ansys::Project::Project::isLoaded() const
```

Indicates if a project is currrently opened (or newly created with success).

### isLocalToProject()

```cpp theme={null}
bool ansys::Project::Project::isLocalToProject(const URL & pURL) const
```

Indicates if the specified absolute [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is inside the project folder.

### isOwnedByProject()

```cpp theme={null}
bool ansys::Project::Project::isOwnedByProject(const URL & pURL) const
```

If the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is a file in the project folder, and registered, returns true.

### isProject()

```cpp theme={null}
bool ansys::Project::Project::isProject(const URL & pLocation)
```

`virtual`

Check if a filename is a project file (fast read, not entirely checked)

### isSubProject()

```cpp theme={null}
bool ansys::Project::Project::isSubProject() const
```

### join()

```cpp theme={null}
Error ansys::Project::Project::join(Iterator pIter)
```

Join the subproject back to the master project.

### loadAllSubProjects()

```cpp theme={null}
Error ansys::Project::Project::loadAllSubProjects()
```

Load all subprojects stored in the project.

### loadSubProject()

```cpp theme={null}
Error ansys::Project::Project::loadSubProject(Iterator & pIter)
```

Load the specified subproject.

**Parameters**

| Name | Description |
| - | - |
| pIter | Folder iterator to split as a subproject. |
| pPrjLocation | Location/name of the project index file, if a blank [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is provided, it is saved alongside the target folder, with the default project filename suffix (.flprj). |
| pNewProject | A blank, properly typed, project object to use (if forking a [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md), use a [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md) target). |

### newProject()

```cpp theme={null}
Error ansys::Project::Project::newProject(const URL & pLocation)
```

`virtual`

Create a project at the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md).

The [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) is a folder with a \*.flprj filename, the location must be writeable. A [Storage](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_storage.md) plug-in must be loaded to accommodate the [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md) type. ( [StorageFilesystem](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_storage_filesystem.md) is always available for local file storage).

The [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) is created from the currently configured [ProjectStoragePolicy](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project_storage_policy.md) and a new folder is created alongside the \*.flprj file, if applicable.

### openProject()

```cpp theme={null}
Error ansys::Project::Project::openProject(
    const URL & pLocation,
    bool pFlagReadOnly = false
)
```

`virtual`

Open a project at the specified [URL](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_u_r_l.md).

From the storage policies, opening the project might fail if the project is locked, or read-only not permitted if locked.

**Parameters**

| Name | Description |
| - | - |
| pLocation | : Filename of the project (.flprj) file |
| pFlagReadOnly | : If read-only the project cannot be modified |

### openProjectFromString()

```cpp theme={null}
Error ansys::Project::Project::openProjectFromString(
    const std::string & pProjectData,
    const URL & pProjectLocation,
    bool pFlagReadOnly = false
)
```

`virtual`

Open a project by reading its data from a string.

**Parameters**

| Name | Description |
| - | - |
| pProjectData | [Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) data, such as written by [saveProjectToString()](#aff3afe814f2bc3189971d237f31b8543) |
| pProjectLocation | Location on filesystem, assumed for relative URLs |
| pFlagReadOnly | If read-only, the project cannot be modified |

### projectObjectFactory()

```cpp theme={null}
Project * ansys::Project::Project::projectObjectFactory() const
```

`protected` `virtual`

Create a new object of the current effective project type.

Overridden at the [SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md) level

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#a865af56735c74ddbb95132c8e68e7d31).

### registerCallback()

```cpp theme={null}
bool ansys::Project::Project::registerCallback(
    const std::string & pOwner,
    const std::string & pCallbackName,
    BaseCallback * pCallback
)
```

Register a function callback to a project event.

[Project](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_project) events are generated by the project viewer UI contextMenuActions, itemDoubleClick, itemSelected, etc.

**Parameters**

| Name | Description |
| - | - |
| pOwner | An identifier for the owner of this callback. |
| pCallbackName | One of the standard callback events offered by the project. |
| pCallback | The function callback to execute upon the event. |

### root()

```cpp theme={null}
Iterator ansys::Project::Project::root() const
```

Return the iterator to the project root folder.

### saveAsProject()

```cpp theme={null}
Error ansys::Project::Project::saveAsProject(
    const URL & pLocation,
    bool pFlagCopyFiles = false,
    bool pFlagCopyExternal = false
)
```

Save the project index file to a new location.

The project content is copied if pFlagCopyFiles is enabled The type of the project is kept the same (project folder enabled/disabled).

**Parameters**

| Name | Description |
| - | - |
| pLocation | New location and name of the flprj file |
| pFlagCopyFiles | If enabled, external files and folders are copied to the new project location. |
| pFlagCopyFiles | If the project contains references to external files, they will be copied to the new project folder. |

### saveProject()

```cpp theme={null}
Error ansys::Project::Project::saveProject()
```

Save the currently opened project.

### saveProjectToString()

```cpp theme={null}
Error ansys::Project::Project::saveProjectToString(std::string & pString)
```

Save the currently opened project to an XML string.

### setDir()

```cpp theme={null}
bool ansys::Project::Project::setDir(Iterator & pDir)
```

### setupNewProject()

```cpp theme={null}
Error ansys::Project::Project::setupNewProject()
```

`protected` `virtual`

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#af5cbc075cc51feb22d83b3bedc32f366).

### unarchiveProject()

```cpp theme={null}
Error ansys::Project::Project::unarchiveProject(
    const URL & pArchive,
    const URL & pTargetFolder
)
```

`static`

Extract the project to an from an archive,.

It will extract/overwrite the project files in the specified folder

### updateFromPolicy()

```cpp theme={null}
virtual Error ansys::Project::Project::updateFromPolicy()
```

`inline` `protected` `virtual`

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#ada4a9e1fd566f6269eee8c4ebdab00dc).

### upgradeProject()

```cpp theme={null}
Error ansys::Project::Project::upgradeProject()
```

`virtual`

Upgrade project to current version.

Upgrading a project might make it incompatible with earlier versions of the software. Some metadata definitions might not be useable with the current software version until the project is updated.

See also ProjectStorageManager::setAutoUpgradesEnabled(bool). If automatic upgrades are enabled in the project policy, the project is upgraded when it is read.

Reimplemented in [ansys::Project::SimProject](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/2025-r2/classansys_1_1_project_1_1_sim_project.md#a4f6fa68a1de203d8ee8c306f03977422).

## Member Data Documentation

### sFormatVersion

```cpp theme={null}
int ansys::Project::Project::sFormatVersion = 2
```

`static` `protected`
