> For the complete documentation index, see [llms.txt](https://help.auxalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.auxalia.com/plant-tools/plantdatamanager/how-to-use/file-locking.md).

# File Locking

This chapter describes the file locking mechanism when using regular projects (not Collaboration Projects).

If the expression PDMDataCache\_\[USERNAME].dcf is used, it means this is the data cache file of PlantDataManager with your changes in it.

Remark: The NPO\_\[DWGGUID].xml files are currently not locked.

<details>

<summary>Use Cases when using PlantDataManager</summary>

This section shows how PlantDataManager handles the locking of the PDMDataCache\_\[USERNAME].dcf. The following is a list of use cases when using PlantDataManager. 1.Opening the project in PlantDataManager with no existing changes yet If you open the project and you didn't make any changes yet, then there is no PDMDataCache\_\[USERNAME].dcf and therefore there will be no PDMDataCache\_\[USERNAME].dcf.lock file either.

![](/files/wWMIqaqRmG9OvxV9enmn)

2.Saving first changes in PlantDataManager with no prior changes When saving your first changes the PDMDataCache\_\[USERNAME].dcf will be created and with that also the PDMDataCache\_\[USERNAME].dcf.lock file.

![](/files/7tt5Ua5hm5C8Q0MkuCrA)

3.Closing project with existing changes If you close the project in PlantDataManager and there is a PDMDataCache\_\[USERNAME].dcf and a PDMDataCache\_\[USERNAME].dcf.lock file, then the lock file will be removed when the project is closed.

![](/files/Y83UxMMFTtI8ew71ZoMd)

4.Opening the project in PlantDataManager with existing changes If you open a project with an existing PDMDataCache\_\[USERNAME].dcf, then the lock file will be created during the loading process.

![](/files/7tt5Ua5hm5C8Q0MkuCrA)

5.Opening the project in PlantDataManager with existing changes while the changes are already loaded in PlantDataManager Plugin If there is already a PDMDataCache\_\[USERNAME].dcf.lock file because the changes from your PDMDataCache\_\[USERNAME].dcf are loaded in PlantDataManager Plugin you will get this dialog:

![](/files/TbGmVxNjVQLgkRDe98lk)

You cannot continue making new changes if the PDMDataCache\_\[USERNAME].dcf is already in the process of being imported.

</details>

<details>

<summary>Use Cases when using PlantDataManager Plugin</summary>

This section shows how PlantDataManager Plugin handles the locking of the PDMDataCache\_\[USERNAME].dcf. The following is a list of use cases when using PlantDataManager Plugin. 1.Opening the project in PlantDataManager Plugin with existing changes If you open a project with an existing PDMDataCache\_\[USERNAME].dcf, then the lock file will be created when the PlantDataManager Plugin gets opened.

![](/files/7tt5Ua5hm5C8Q0MkuCrA)

2.Opening the project in PlantDataManager Plugin with existing changes while the changes are already loaded in PlantDataManager If there is already a PDMDataCache\_\[USERNAME].dcf.lock file because the changes from your PDMDataCache\_\[USERNAME].dcf are loaded in PlantDataManager you will get this dialog:

![](/files/QvNgmuq1csTeyykOou4V)

Because you cannot import the changes, your changes will be shown as **In Progress** in PlantDataManager Plugin.

![](/files/oNPiw8MyNPIBTB5lxDvm)

</details>

<details>

<summary>Use Cases when using SQL Server</summary>

The uses cases when using SQL Server are essentially the same as when using SQLite. However, PlantDataManager will create the dcf file with xml content which points to a SQL Server database. And the SQL Server database will also be created by PlantDataManager. The behavior of the lock file is the same as with SQLite projects. A small difference compared to SQLite projects is, that the dcf file and the SQL Server databases will not be deleted if the DataCache table is empty (e.g., when all changes are imported). Remark: Make sure the PlantDataManager users have sufficient user rights to be able to create databases on SQL Server.

</details>
