> 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/plantbatch/how-to-use/configuration/implementing-counter.md).

# Implementing Counter

This chapter described how you can implement a counter which is then used at the bottom of the PlantBatch dialog.

You just need to add these red line into you **Execution Script**.

```
**(progn**
```

```
**(setq f (open "[StatusFile]" "w"))**
```

```
**(princ "[DrawingIndex]|[DrawingCount]|[FilePathAndNameExt]" f)**
```

```
**(close f)**
```

```
**)**
```

```
_OPEN
```

```
"[FilePathAndNameExt]"
```

```
_.AqaPETUpdateCalculationsDrawing
```

```
_.AqaPETUpdateListInDrawing
```

```
_.AqaPlUpdateLinksInCurrentDrawing
```

```
(command "AUTOPUBLISH" "")
```

```
_QSAVE
```

This would then look like this:

![](https://2994090777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZH2AGHzvPfBW7YdaaGc0%2Fuploads%2Fgit-blob-824d5b66e60b9af6bbd7ce452efd13ecfc3c97fc%2FPB-MainDialog-0054.png?alt=media)

How this appears in PlantBatch can be seen under [Main Dialog](/plant-tools/plantbatch/how-to-use/user-interface/main-dialog.md).
