How to create text annotations in 3D view

Hello there,

I am having some trouble creating simple text annotation in Revit’s 3D view, using dynamo tools.
I have a list of points and a list of string data with which I want to create a text annotation in the 3D view.
I found two work arounds, one is to create a custom family using model text, then create family instances from it. The other is to use the TextNote.ByLocation dynamo node, however this does not let me create it in 3D view. None of these are optimal for me, and it seems I’m missing something obvious.

Thank you for the help!

Can you at least show us your graph (with node preview bubbles turned on)? Most people aren’t willing to guess at exactly what you’ve done. Are you getting any errors? Have you locked the 3D view?

Yeah sorry.
I don’t have any errors, I have two working solutions, but both are compromises in some way.

This is the first one I got working. In this case I have a custom family containing a model text, and then I create instances of this at the given points, and set the text I want to display with parameters. This works, however the 3D text aspect of it is unnecessary for me, and not really ideal.

This is the other solution I could find. I give the same inputs (points to location, text to the text input), however this does not let me generate it to the 3D view. It works for others, for example the level 1.

So I was just wondering if there is a way to generate a simple text annotation for the 3D view of Revit. The goal of it is to just add some visible information to some basic shapes in the 3D view.
Thanks for the help!

Is your 3D view locked? You can only add annotation to a locked 3D view.

1 Like

I locked the 3D view, saved it, then referenced it, but the node then throws the error you can see in the picture.

Is this what you meant?

Yup. Must be something with the method used by that node. It worked for me (Revit 2022) when I wrote it up in Python.

import clr
from Autodesk.DesignScript.Geometry import *
import Revit
from Revit.Elements import *
from System.Collections.Generic import *
from Autodesk.Revit.DB import *
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

dataEnteringNode = IN
view = UnwrapElement(IN[0])
point = UnwrapElement(IN[1])
type = UnwrapElement(IN[2])
text = IN[3]

note = TextNote.Create(doc,view.Id,point.ToXyz(),text,type.Id)

OUT = note

This worked for me aswell! Thank you, I will try and work with this.