Getting Keynote Values

I’m trying to get the Keynote Text string of the document, basically the highlighted texts (preferably from given Key Values).

image

So far I’ve been able to get the Keynote Table and get it’s Entries, which I believe contain the data. But how should I access the data inside this object? Below is screenshot and code:

import clr

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

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

#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])

a = element.GetKeyBasedTreeEntries()

c= []

for i in a:
	b = i.ToString()
	c.append(b)

OUT = c
1 Like
a = element.GetKeyBasedTreeEntries()
c= []
for i in a:
	b = i.KeynoteText    #  i.Key #i.ParentKey
	c.append(b)
OUT = c
3 Likes