# Add List: Numbers to Text Note

**URL:** <https://forum.dynamobim.com/t/add-list-numbers-to-text-note/17335>\
**Category:** Uncategorized\
**Created:** [December 13, 2017, 12:34am UTC](https://forum.dynamobim.com/t/add-list-numbers-to-text-note/17335 "2017-12-13T00:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [March 26, 2018, 8:45pm UTC](https://forum.dynamobim.com/t/add-list-numbers-to-text-note/17335/7 "2018-03-26T20:45:15Z")

</div>

@Ewan_Opie Your o2 needs to be a TextRange, which in the code below I retrieve from the text note’s FormattedText with the [AsTextRange() method](http://www.revitapidocs.com/2018/a9cd63f5-8458-a362-723d-3db060d29b75.htm) but you can construct your own with `TextRange(int,int)`. The only other part you were missing is to get the ListType with System.Enum.Parse (below I left it as an input but you could as well get rid of IN[1] and just have a line that says `listType = System.Enum.Parse(Autodesk.Revit.DB.ListType, "ArabicNumbers")`

![set%20textnote%20list](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0dad2c03e4914823360b708c1b5afcd2823199b9.png)

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

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

from System.Collections.Generic import *

clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

dataEnteringNode = IN

textNotes = IN[0]
listType = System.Enum.Parse(Autodesk.Revit.DB.ListType, IN[1])

if not isinstance(textNotes, list):
	textNotes = [textNotes]

TransactionManager.Instance.EnsureInTransaction(doc)

for textNote in textNotes:

	textNote = UnwrapElement(textNote)
	formatText = textNote.GetFormattedText()
	textRange = formatText.AsTextRange()
	formatText.SetListType(textRange,listType)
	textNote.SetFormattedText(formatText)
	
TransactionManager.Instance.TransactionTaskDone()

OUT = textNotes
```

---

_[View the full topic](https://forum.dynamobim.com/t/add-list-numbers-to-text-note/17335)._
