# Title Block Family and Type

**URL:** <https://forum.dynamobim.com/t/title-block-family-and-type/85833>\
**Category:** Revit\
**Tags:** python\
**Created:** [February 7, 2023, 11:38am UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833 "2023-02-07T11:38:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PieterL\_TM](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@PieterL\_TM](https://forum.dynamobim.com/u/PieterL_TM)\
**Post date:** [February 7, 2023, 11:38am UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833/1 "2023-02-07T11:38:56Z")

</div>

Hi everyone

I have a script in which I collect all the Title Block Types in the project, but I can’t seem to figure out how to get the type name

This is my code:

```auto
import clr
#import RevitAPI
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory, Element, FamilySymbol
doc = __revit__.ActiveUIDocument.Document
titleBlocks = FilteredElementCollector(doc).WhereElementIsElementType().OfCategory(BuiltInCategory.OST_TitleBlocks).ToElements()

```

The Family Name can be easily called with the ‘FamilyName’-attribute, but how do I get the Type Name, I have to be missing something…

Any help is welcome!

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [February 7, 2023, 11:48am UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833/3 "2023-02-07T11:48:36Z")

</div>

@PieterL_TM ,

i copied the template Python primier - it works!

```auto
import sys
import System
import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('System')
from System.Collections.Generic import List

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

titleBlocks = FilteredElementCollector(doc).WhereElementIsElementType().OfCategory(BuiltInCategory.OST_TitleBlocks).ToElements()

OUT = titleBlocks

```

![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/4/244df8d8cdfe67cc5d2d4d45e8b2fc486a603b23.png)  
KR  
Andreas

---

<div class="post-metadata">

**Author:** ![PieterL\_TM](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@PieterL\_TM](https://forum.dynamobim.com/u/PieterL_TM)\
**Post date:** [February 7, 2023, 12:16pm UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833/4 "2023-02-07T12:16:01Z")

</div>

My bad, I didn’t specify that I was writing this outside of dynamo. I want the Type Name as a string in Python.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [February 7, 2023, 3:13pm UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833/5 "2023-02-07T15:13:50Z")

</div>

If you’re already dealing with the Types then the Name property should be the type name or you can always look up the Type Name parameter value.

---

<div class="post-metadata">

**Author:** ![PieterL\_TM](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@PieterL\_TM](https://forum.dynamobim.com/u/PieterL_TM)\
**Post date:** [February 7, 2023, 4:00pm UTC](https://forum.dynamobim.com/t/title-block-family-and-type/85833/6 "2023-02-07T16:00:08Z")

</div>

Yes the lookup worked, I don’t understand why just calling the Name doen’t work though.
