# Instance counter

**URL:** <https://forum.dynamobim.com/t/instance-counter/36123>\
**Category:** Uncategorized\
**Created:** [May 17, 2019, 2:10pm UTC](https://forum.dynamobim.com/t/instance-counter/36123 "2019-05-17T14:10:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vik/32/73644_2.png) [@Vik](https://forum.dynamobim.com/u/Vik)\
**Post date:** [May 17, 2019, 2:10pm UTC](https://forum.dynamobim.com/t/instance-counter/36123/1 "2019-05-17T14:10:49Z")

</div>

Greetings everyone  
It is with great joy that I have used a script which originally was developed by Erfajo.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1b5a6c84384b4d6be533d3d27460a35f72c49d40.png)  
[IDENTIFICATOR.dyn](https://forum.dynamobim.com/uploads/short-url/aDkz6gNv8YXA1DyJceYnXuEE1Ik.dyn) (7.3 KB)

As I am dusting off this old script, I wonder if anyone has any thoughts or pointers as how I could modify the script to instead give a three digit count-number like 001, 002, 003 as opposed to the current 1, 2, 3…?

Any help is greatly appreciated. Good weekend to you all! 😃

---

<div class="post-metadata">

**Author:** ![architectcoding](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/architectcoding/32/105118_2.png) [@architectcoding](https://forum.dynamobim.com/u/architectcoding)\
**Post date:** [May 17, 2019, 2:29pm UTC](https://forum.dynamobim.com/t/instance-counter/36123/2 "2019-05-17T14:29:58Z")

</div>

Use the node String.PadLeft, like this:

> [@Pad leading zero to Room Number](https://forum.dynamobim.com/t/pad-leading-zero-to-room-number/35797/18):
>
> [image]

---

<div class="post-metadata">

**Author:** ![Vik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vik/32/73644_2.png) [@Vik](https://forum.dynamobim.com/u/Vik)\
**Post date:** [May 20, 2019, 12:48pm UTC](https://forum.dynamobim.com/t/instance-counter/36123/3 "2019-05-20T12:48:53Z")

</div>

I followed the suggestion in the link and came up with this. Despite the warning message (Dynamo for Revit 2.0.2) it works like a charm in version 1.3.2. 🙂

 ![Padding](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/1/112413225ff6919059f31d84af38f54e2fcd43e1.png)

---

<div class="post-metadata">

**Author:** ![architectcoding](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/architectcoding/32/105118_2.png) [@architectcoding](https://forum.dynamobim.com/u/architectcoding)\
**Post date:** [May 20, 2019, 12:52pm UTC](https://forum.dynamobim.com/t/instance-counter/36123/4 "2019-05-20T12:52:24Z")

</div>

not a big problem, the script is only telling you to change Count to DSCore.List.Count and that will work without warnings in Dynamo 2.

---

<div class="post-metadata">

**Author:** ![Vik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vik/32/73644_2.png) [@Vik](https://forum.dynamobim.com/u/Vik)\
**Post date:** [May 20, 2019, 1:01pm UTC](https://forum.dynamobim.com/t/instance-counter/36123/5 "2019-05-20T13:01:49Z")

</div>

Ah! Thank you for your help architectcoding! 😉
