# Family Numbering

**URL:** <https://forum.dynamobim.com/t/family-numbering/109948>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [May 7, 2025, 1:41pm UTC](https://forum.dynamobim.com/t/family-numbering/109948 "2025-05-07T13:41:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![niels.van.hove](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@niels.van.hove](https://forum.dynamobim.com/u/niels.van.hove)\
**Post date:** [May 7, 2025, 1:41pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/1 "2025-05-07T13:41:50Z")

</div>

It’s been a while!

I’ve got a challenge / problem. i’ve created a script that assings number for each family placed in my project to identify them. my amount of families has grown and so have my types per family.

what i’ve been trying to do is assign each family a letter and each type of the family a number after the letter. small example. family 1 = A / Family Type 1 = A1 / Family Type 2 = A2

 ![StructConnectionALL_SetParam_Mark_2025-05-07_03-41-17](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/6/b624b04ddce910439228cff78ba7f66caa9df2b2.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [May 7, 2025, 1:57pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/2 "2025-05-07T13:57:03Z")

</div>

I kinda guess what you problems was from your images.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/5/85d9b2eaa0a80dee62631547708df328537d2107.png)

_Node to Code_ can be helpful to get the right code for a Code Block ‘line’.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/a/daf9a3143513b8a383a1b07626bcaac35fc80af4.png)

---

<div class="post-metadata">

**Author:** ![niels.van.hove](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@niels.van.hove](https://forum.dynamobim.com/u/niels.van.hove)\
**Post date:** [May 7, 2025, 2:10pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/3 "2025-05-07T14:10:55Z")

</div>

that’s exactly what im looking for. do you know if theres a way to just get the letter without number if its a family with one type?

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [May 7, 2025, 2:29pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/4 "2025-05-07T14:29:15Z")

</div>

Yes (there are multiple ways)

I don’t have access to Dynamo anymore.

You can do it with an ‘If statement’ for example.  
If your list count is only one (1) replace the  
1 with a “” if not use the list.

Hope that makes sense.

`lst == 1 ? “” : lst ;`

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b317ec7491a69a44b4b78b4931d741c555c31254.png)

**NB**  
I didn’t take List Levels into account  
above code. So you might need to fix that.

_lst_ being the list with your Family **Types**.  
Something like that(?).

---

<div class="post-metadata">

**Author:** ![niels.van.hove](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@niels.van.hove](https://forum.dynamobim.com/u/niels.van.hove)\
**Post date:** [May 7, 2025, 2:51pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/5 "2025-05-07T14:51:00Z")

</div>

i think this will do the trick! thanks a lot.

sometimes the answer is so obvious to me i cant find it 😬

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [May 7, 2025, 3:00pm UTC](https://forum.dynamobim.com/t/family-numbering/109948/6 "2025-05-07T15:00:17Z")

</div>

That i was these forums are for 🙂.

Just in case 👇.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/6/162dbd3492edbcc990fb3b81bea17f5699905c14.png)

_Alternative_

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f590597fa19ef31639e7ff6c7b70fde4ae24c749.png)

DynamoSanbox FTW 😃.
