# Automatic DWG File Locking For Autodesk AutoCAD

When opening an AutoCAD® DWG drawing from a <code class="expression">space.vars.PRODUCT\_NAME</code> network drive, <code class="expression">space.vars.PRODUCT\_NAME</code> will take out a lock on the file to ensure that only one user at a time can edit the drawing. <code class="expression">space.vars.PRODUCT\_NAME</code> will also ensure that when a user opens the drawing, the latest version of the drawing is opened. Together, this helps to prevent changes from being unintentionally overwritten.

The locking support is automatic. The user does not need to perform any specific steps to lock/unlock or check out/check in the drawing. The behaviour should be familiar to users working with AutoCAD® drawings on local file servers.

On opening a DWG drawing file, <code class="expression">space.vars.PRODUCT\_NAME</code> will check if it is locked. If so, the user will see the familiar alert from AutoCAD®. The alert will show the username of the user that is editing the drawing and the SharePoint site where the drawing is located.

<figure><img src="/files/Vq4aqhqyBSsAywo59pjR" alt=""><figcaption></figcaption></figure>

If the drawing was not already locked, AutoCAD® will proceed to open the drawing and a lock will be taken out. <code class="expression">space.vars.PRODUCT\_NAME</code> will regularly refresh the lock whilst the drawing is opened. On closing the drawing in AutoCAD®, the lock will automatically be released.

If there is a more recent version of the drawing available then AutoCAD® will show an alert to the user when opening the drawing. The user should click OK and open the drawing again and <code class="expression">space.vars.PRODUCT\_NAME</code> will ensure they are opening the latest version.

<figure><img src="/files/Mi05Lc9bPnar6Edp5lac" alt=""><figcaption></figcaption></figure>

<code class="expression">space.vars.PRODUCT\_NAME</code> locking support has been tested to work with AutoCAD® 2024 and AutoCAD LT® 2024. Prior versions of AutoCAD® should also be compatible.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zeedrive.com/feature-guide/automatic-dwg-file-locking-for-autodesk-autocad.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
