    

 ## On this page

  

 

 # ansys::Project::Project Class Reference

 Last update: 16.07.2025 

Base class for [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") API, also see [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects."). [More...](classansys_1_1_project_1_1_project.xhtml#details)

`#include "<a class="el" href="_project_8hpp_source.xhtml">Project.hpp</a>"`

Inheritance diagram for ansys::Project::Project:

 ![](/sites/default/files/migrate-content/common_fluids_format_/classansys_1_1_project_1_1_project.png)



## <a id="nested-classes" name="nested-classes"></a>Classes

struct [CheckProjectInfo](structansys_1_1_project_1_1_project_1_1_check_project_info.xhtml) Utility structure for VisitorCheckProject project checking action. [More...](structansys_1_1_project_1_1_project_1_1_check_project_info.xhtml#details)  
 ## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

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

static [Error](classansys_1_1_project_1_1_error.xhtml) [unarchiveProject](classansys_1_1_project_1_1_project.xhtml#a336ac0d006d6a24a08f1894c66e33940) (const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;pArchive, const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;pTargetFolder) Extract the project to an from an archive,. [More...](classansys_1_1_project_1_1_project.xhtml#a336ac0d006d6a24a08f1894c66e33940)  
 ## <a id="pro-methods" name="pro-methods"></a>Protected Member Functions

virtual [Project](classansys_1_1_project_1_1_project.xhtml) \* [projectObjectFactory](classansys_1_1_project_1_1_project.xhtml#a5e93913e59ac2ba3e0a6fad5a4ef667a) () const Create a new object of the current effective project type. [More...](classansys_1_1_project_1_1_project.xhtml#a5e93913e59ac2ba3e0a6fad5a4ef667a)  
 virtual [Error](classansys_1_1_project_1_1_error.xhtml) [copyProjectContent](classansys_1_1_project_1_1_project.xhtml#afe6dccd1d416c6e84967a68107af8515) ([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pFolder, const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;pSourceFolder, const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;pTargetFolder, std::map&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml), [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &gt; &amp;pURLChanges, bool pCopyExternalFiles, bool pEnforceStructure) Internal function - Copy a folder iterator content files from a source directory to target. [More...](classansys_1_1_project_1_1_project.xhtml#afe6dccd1d416c6e84967a68107af8515)  
 <a id="details" name="details"></a>## Detailed Description

Base class for [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") API, also see [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects.").

To use the concepts of [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders."), [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step."), [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step."), and [Result](classansys_1_1_project_1_1_result.xhtml "Result (data) file, output of a Simulation Run."), a [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects.") should be used to create/load the files.

The [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") object is the low-level service, offering only the File, Folder, and Link capabilities.

The project concept is detailed in [Project API](_project_a_p_i.xhtml).



## Constructor &amp; Destructor Documentation

<a id="ae26ec5c1449c349cc767bdae9deb4339" name="ae26ec5c1449c349cc767bdae9deb4339"></a>## [◆ ](#ae26ec5c1449c349cc767bdae9deb4339)Project()

 ansys::Project::Project::Project  ( ) 

Constructor.

A project should be created/opened with [newProject()](classansys_1_1_project_1_1_project.xhtml#a747d6326df2792b9830c54daf538071b "Create a project at the specified URL.")/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()](classansys_1_1_project_1_1_project.xhtml#a554127e81daa6f0836dffcf33d17988c "Return the StoragePolicy for the current project or to configure before newProject().").





## Member Function Documentation

<a id="a0c8749326d29338aac4be6c06a49570f" name="a0c8749326d29338aac4be6c06a49570f"></a>## [◆ ](#a0c8749326d29338aac4be6c06a49570f)archiveProject() \[1/2\]

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::archiveProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *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](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") going up (../) will not be saved in the archive.

Parameters pTargetArchive7z file to write 



<a id="a2f486b3e690db9742eab5a2775d0b74d" name="a2f486b3e690db9742eab5a2775d0b74d"></a>## [◆ ](#a2f486b3e690db9742eab5a2775d0b74d)archiveProject() \[2/2\]

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::archiveProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pTargetArchive*,    const std::vector&lt; std::string &gt; &amp;  *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](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") going up (../) will not be saved in the archive.

Parameters pTargetArchive7z file to write pListIgnorelist of file names or patterns to ignore 



<a id="a9926355c9f869546253870307d4c3f2a" name="a9926355c9f869546253870307d4c3f2a"></a>## [◆ ](#a9926355c9f869546253870307d4c3f2a)checkProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::checkProject  ( [CheckProjectInfo](structansys_1_1_project_1_1_project_1_1_check_project_info.xhtml) &amp;  *pSettings*)  const  virtual 

Check if a [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") is valid.

Parameters pSettings[CheckProjectInfo](structansys_1_1_project_1_1_project_1_1_check_project_info.xhtml "Utility structure for VisitorCheckProject project checking action.") structure used to specify check project settings and return the results. Reimplemented in [ansys::Project::SimProject](classansys_1_1_project_1_1_sim_project.xhtml#a9d89fa7443d65f1e2ad3befee9da068d).





<a id="a940472a5df9b1275453c6880c68fb156" name="a940472a5df9b1275453c6880c68fb156"></a>## [◆ ](#a940472a5df9b1275453c6880c68fb156)closeProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::closeProject  ( ) 

Close the project and release the lock.

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





<a id="a1c8960088174c3f898449c35d492367c" name="a1c8960088174c3f898449c35d492367c"></a>## [◆ ](#a1c8960088174c3f898449c35d492367c)copyItemTo()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Project::copyItemTo  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pSource*,    [Project](classansys_1_1_project_1_1_project.xhtml) &amp;  *pTarget*,    [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pTargetFolder* = `<a class="el" href="classansys_1_1_project_1_1_iterator.xhtml">Iterator</a>()`,    bool  *pRecursive* = `false`   ) 

Copy the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") item to the target project.

This operation only copies the project index data, not the files themselves. The [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") pointed by the files is only valid if the new project is appropriately positioned.





<a id="afe6dccd1d416c6e84967a68107af8515" name="afe6dccd1d416c6e84967a68107af8515"></a>## [◆ ](#afe6dccd1d416c6e84967a68107af8515)copyProjectContent()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::copyProjectContent  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pFolder*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pSourceFolder*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pTargetFolder*,    std::map&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml), [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &gt; &amp;  *pURLChanges*,    bool  *pCopyExternalFiles*,    bool  *pEnforceStructure*   )   protectedvirtual 

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

Parameters pFolder[Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") of a folder to copy. pSourceFolderLocation of the storage for the folder. pTargetFolderLocation of the storage for the new folder (folder must exist already). pURLChangesIf Iterators would have their [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") changed by saving a project to the new location, this index is to be filled with iterators and their new [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") (setURL/getURL). In the case of a saveAsProject the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") changes are applied and kept, in the case of an export the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") changes are to be applied , the project saved, then restored. pFlagCopyExternalif enabled, external files and folders are copied to the new project location. if disabled, [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") references are kept as is. If a file is stored in a unregistered subfolder, the same file structure is copied to the target location. pFlagEnforceStructureThe project is saved to a project folder and subfolders are enforced to their Simulation/Run names. 



<a id="a37831e1a7dc4360781de4a9c44b88d5b" name="a37831e1a7dc4360781de4a9c44b88d5b"></a>## [◆ ](#a37831e1a7dc4360781de4a9c44b88d5b)eraseProjectLock()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::eraseProjectLock  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pLocation*) 

Erase the project lock.

Parameters pLocation[URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") of the project file. 



<a id="af431224de932d828ab1d824978d4caa0" name="af431224de932d828ab1d824978d4caa0"></a>## [◆ ](#af431224de932d828ab1d824978d4caa0)exportProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::exportProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *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 pLocationNew location and name of the flprj file pFlagCopyExternalIf enabled, external files and folders are copied to the new project location. If disabled, [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") references are kept as is pFlagEnforceStructureThe project is saved to a project folder and subfolders are enforced to their Simulation/Run names. 



<a id="ac3f62102beca5155952fcf14114ef98c" name="ac3f62102beca5155952fcf14114ef98c"></a>## [◆ ](#ac3f62102beca5155952fcf14114ef98c)forkProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::forkProject  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pIter*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pNewProjectFilename*,    [Project](classansys_1_1_project_1_1_project.xhtml) \*&amp;  *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](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") filename.

Parameters pIterFolder iterator to split as a subproject. pPrjLocationLocation/name of the project index file, if a blank [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is provided, it is saved alongside the target folder, with the default project filename suffix (.flprj). pNewProjectA blank, properly typed, project object to use (if forking a [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects."), use a [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects.") target). 



<a id="a7e8b3e5b9ea8fcf583b9bff9e887dc09" name="a7e8b3e5b9ea8fcf583b9bff9e887dc09"></a>## [◆ ](#a7e8b3e5b9ea8fcf583b9bff9e887dc09)get()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::Project::get  ( const [Path](classansys_1_1_project_1_1_path.xhtml) &amp;  *pPath*)  const

For a project [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem."), return the associated [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.").

The [Path](classansys_1_1_project_1_1_path.xhtml "Paths used for internal Project filesystem.") is the internal project hiearchy, which might include hidden/virtual subfolders. To get the iterator from a file path on disk, see [getIteratorForURL()](classansys_1_1_project_1_1_project.xhtml#af7698dfb8ecc0eedf251d8f0f30abb70 "If the specified URL is a file in the project folder, and registered, returns the Iterator.").





<a id="a1de046a523c12e7e7c50aba05ba74e1e" name="a1de046a523c12e7e7c50aba05ba74e1e"></a>## [◆ ](#a1de046a523c12e7e7c50aba05ba74e1e)getInheritedMetadata()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::getInheritedMetadata  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pIter*,    [MetadataConst](classansys_1_1_project_1_1_metadata_const.xhtml) &amp;  *pMeta*   )   virtual 

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

In [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") 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](classansys_1_1_project_1_1_sim_project.xhtml#af0007299e8f3e397ef30c8736a12d873).





<a id="a1551943e6a65f018080a31a4bcdf1b80" name="a1551943e6a65f018080a31a4bcdf1b80"></a>## [◆ ](#a1551943e6a65f018080a31a4bcdf1b80)getProjectLockInfo()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::getProjectLockInfo  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pLocation*,    std::string &amp;  *pLockInfo*   ) 

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

Parameters pLocation[URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") of the project to check. pLockInfostring indicating the lock source, empty string if no lock Returns[Error](classansys_1_1_project_1_1_error.xhtml "The return state / error value of a Project function call.") if the lock info cannot be retrieved. 



<a id="a95f212b1ae0044de8b53d21a08e2ee0e" name="a95f212b1ae0044de8b53d21a08e2ee0e"></a>## [◆ ](#a95f212b1ae0044de8b53d21a08e2ee0e)loadSubProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::loadSubProject  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pIter*) 

Load the specified subproject.

Parameters pIterFolder iterator to split as a subproject. pPrjLocationLocation/name of the project index file, if a blank [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is provided, it is saved alongside the target folder, with the default project filename suffix (.flprj). pNewProjectA blank, properly typed, project object to use (if forking a [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects."), use a [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects.") target). 



<a id="a747d6326df2792b9830c54daf538071b" name="a747d6326df2792b9830c54daf538071b"></a>## [◆ ](#a747d6326df2792b9830c54daf538071b)newProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::newProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pLocation*)   virtual 

Create a project at the specified [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.").

The [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") is a folder with a \*.flprj filename, the location must be writeable. A [Storage](classansys_1_1_project_1_1_storage.xhtml "Base class for file storage management module.") plug-in must be loaded to accommodate the [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.") type. ( [StorageFilesystem](classansys_1_1_project_1_1_storage_filesystem.xhtml "Class for Storage on standard filesystem, for file:// URL.") is always available for local file storage).

The [Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") is created from the currently configured [ProjectStoragePolicy](classansys_1_1_project_1_1_project_storage_policy.xhtml "Project storage settings, control folder management, folder names, etc.") and a new folder is created alongside the \*.flprj file, if applicable.





<a id="a20e00fbfad7b9823356b635a18a701b3" name="a20e00fbfad7b9823356b635a18a701b3"></a>## [◆ ](#a20e00fbfad7b9823356b635a18a701b3)openProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::openProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pLocation*,    bool  *pFlagReadOnly* = `false`   )   virtual 

Open a project at the specified [URL](classansys_1_1_project_1_1_u_r_l.xhtml "The address of a local or remote file, using the URI format.").

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

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



<a id="a100dd4edabdd2f988cd4b7921ba597e5" name="a100dd4edabdd2f988cd4b7921ba597e5"></a>## [◆ ](#a100dd4edabdd2f988cd4b7921ba597e5)openProjectFromString()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::openProjectFromString  ( const std::string &amp;  *pProjectData*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pProjectLocation*,    bool  *pFlagReadOnly* = `false`   )   virtual 

Open a project by reading its data from a string.

Parameters pProjectData[Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") data, such as written by [saveProjectToString()](classansys_1_1_project_1_1_project.xhtml#aff3afe814f2bc3189971d237f31b8543 "Save the currently opened project to an XML string.") pProjectLocationLocation on filesystem, assumed for relative URLs pFlagReadOnlyIf read-only, the project cannot be modified 



<a id="a5e93913e59ac2ba3e0a6fad5a4ef667a" name="a5e93913e59ac2ba3e0a6fad5a4ef667a"></a>## [◆ ](#a5e93913e59ac2ba3e0a6fad5a4ef667a)projectObjectFactory()

 [Project](classansys_1_1_project_1_1_project.xhtml) \* ansys::Project::Project::projectObjectFactory  ( )  const  protectedvirtual 

Create a new object of the current effective project type.

Overridden at the [SimProject](classansys_1_1_project_1_1_sim_project.xhtml "Main object for Simulation based projects.") level

Reimplemented in [ansys::Project::SimProject](classansys_1_1_project_1_1_sim_project.xhtml#a865af56735c74ddbb95132c8e68e7d31).





<a id="a5aabe52873c70c358b5676d7a040a9d5" name="a5aabe52873c70c358b5676d7a040a9d5"></a>## [◆ ](#a5aabe52873c70c358b5676d7a040a9d5)registerCallback()

 bool ansys::Project::Project::registerCallback  ( const std::string &amp;  *pOwner*,    const std::string &amp;  *pCallbackName*,    BaseCallback \*  *pCallback*   ) 

Register a function callback to a project event.

[Project](classansys_1_1_project_1_1_project.xhtml "Base class for Project API, also see SimProject.") events are generated by the project viewer UI contextMenuActions, itemDoubleClick, itemSelected, etc.

Parameters pOwnerAn identifier for the owner of this callback. pCallbackNameOne of the standard callback events offered by the project. pCallbackThe function callback to execute upon the event. 



<a id="a5030299e80c55a495dc39dc31ccc6692" name="a5030299e80c55a495dc39dc31ccc6692"></a>## [◆ ](#a5030299e80c55a495dc39dc31ccc6692)saveAsProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::saveAsProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *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 pLocationNew location and name of the flprj file pFlagCopyFilesIf enabled, external files and folders are copied to the new project location. pFlagCopyFilesIf the project contains references to external files, they will be copied to the new project folder. 



<a id="a336ac0d006d6a24a08f1894c66e33940" name="a336ac0d006d6a24a08f1894c66e33940"></a>## [◆ ](#a336ac0d006d6a24a08f1894c66e33940)unarchiveProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::Project::unarchiveProject  ( const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pArchive*,    const [URL](classansys_1_1_project_1_1_u_r_l.xhtml) &amp;  *pTargetFolder*   )   static 

Extract the project to an from an archive,.

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





<a id="aeeb9331e9e1324ba6fa24e84515df312" name="aeeb9331e9e1324ba6fa24e84515df312"></a>## [◆ ](#aeeb9331e9e1324ba6fa24e84515df312)upgradeProject()

 [Error](classansys_1_1_project_1_1_error.xhtml) 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](classansys_1_1_project_1_1_sim_project.xhtml#a4f6fa68a1de203d8ee8c306f03977422).