Textnote BoundingBox to Exclude leader

I am trying to create a bounding box around a text however the bounding box is including the leader. Is there a way to exclude the leader from the bounding box?


Thank you in advance :slight_smile:

Maybe you could try to:

  • Filter/separate the text notes with leaders.
  • Use Dynamo to remove the leaders (change properties of text blocks)
  • Get the bounding boxes.
  • Undo the removal or recreate the leader using Dynamo.

Thank you for the quick reply. I am looking to create a bounding box in Dynamo, not in Revit. Are you suggesting that I can access the “show Border” type parameter in Dynamo.

I don’t know, but you can change the color of the text note to make it stand out. Revit graphics have limitations, but you get speed in return…

Hi Joe, your approach sounds logical, however I am not sure how to:
-parse the notes with/without leaders
-temporarily remove leader

I should also mention, that this is a task needs to scale up to run a graph on an entire sheet with up to 15 views of revit details. thank you :slight_smile:

Try searching the forum a bit- You will probably need some nodes from packages or Python.

I have Rhythm installed, and that has a node TextNotes.GetLeaders which you can use to filter text notes that have leaders.
This thread indicates the GeniusLoci package has nodes to manage leaders:

Finally, there is an active thread talking about managing undos with Dynamo:

The TextNote class has a Width and a Height property which you could pull in Python. Combine that with the location and alignment properties and you can build a bounding box.

1 Like

Thank you for the suggestion. However, my knowledge with python is next to none. Is there another thread that can provide me with the info to do this? thank you :slight_smile:

Not offhand for this task.

Start with one text element. Then check out the Dynamo Python Primer for a boilerplate code. Then get the ensure you have the input text element being unwrapped. From there you can pull each of the properties listed above. You can then output them as a list, and use that to build the bounding box in Revit.

Once that is done, start to look into processing a list of text elements in Python.

Give it a shot and if you get stuck post your working dyn and the larger community can help you out.

1 Like