# Textnote BoundingBox to Exclude leader

**URL:** <https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937>\
**Category:** Uncategorized\
**Created:** [November 29, 2023, 3:13pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937 "2023-11-29T15:13:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanyiwamura](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@hanyiwamura](https://forum.dynamobim.com/u/hanyiwamura)\
**Post date:** [November 29, 2023, 3:13pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/1 "2023-11-29T15:13:33Z")

</div>

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?

 ![Revit Screenshot](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/a/0a9ddbdfcae5348d589f732ee6eb950d668977dd.png)  
 ![Screenshot 2023-11-29 101121](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1aeb65404c75208432e01965bce1d9ebb74f13bd.png)

Thank you in advance 🙂

---

<div class="post-metadata">

**Author:** ![Andrej](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andrej/32/172909_2.png) [@Andrej](https://forum.dynamobim.com/u/Andrej)\
**Post date:** [November 29, 2023, 3:38pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/2 "2023-11-29T15:38:44Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1fb17ea0f4827713e6d729cf83caecebebb07350.jpeg)

---

<div class="post-metadata">

**Author:** ![Joe.Charpentier](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joe.charpentier/32/49617_2.png) [@Joe.Charpentier](https://forum.dynamobim.com/u/Joe.Charpentier)\
**Post date:** [November 29, 2023, 4:15pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/3 "2023-11-29T16:15:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hanyiwamura](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@hanyiwamura](https://forum.dynamobim.com/u/hanyiwamura)\
**Post date:** [November 29, 2023, 4:59pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/4 "2023-11-29T16:59:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andrej](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andrej/32/172909_2.png) [@Andrej](https://forum.dynamobim.com/u/Andrej)\
**Post date:** [November 29, 2023, 5:26pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/5 "2023-11-29T17:26:55Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![hanyiwamura](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@hanyiwamura](https://forum.dynamobim.com/u/hanyiwamura)\
**Post date:** [November 29, 2023, 8:55pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/6 "2023-11-29T20:55:19Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Joe.Charpentier](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joe.charpentier/32/49617_2.png) [@Joe.Charpentier](https://forum.dynamobim.com/u/Joe.Charpentier)\
**Post date:** [November 29, 2023, 9:21pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/7 "2023-11-29T21:21:34Z")

</div>

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:

> [@Text Note Leader](https://forum.dynamobim.com/t/text-note-leader/62696/4):
>
> Hi, I used TextNote AddLeader node of your package. So, do you have TextNote RemoveLeader? Thanks and kind regards!

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

> [@Undo Dynamo Action](https://forum.dynamobim.com/t/undo-dynamo-action/75161/):
>
> Hello Dynamo Friends slight_smile I would like to know which actions that run in a dynamo script can be undone in revit after the run. An example: I have a dynamo script that duplicates a view. After the run i can not undo that in revit. Can i affect that behavior by wrapping something in the script in a transaction? Pretty shure thats a revit thing and not a dynamo thing, would be thankfull for any information regarding the undo behavior slight_smile Kind regards

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 30, 2023, 12:06am UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/8 "2023-11-30T00:06:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hanyiwamura](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@hanyiwamura](https://forum.dynamobim.com/u/hanyiwamura)\
**Post date:** [November 30, 2023, 2:45pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/9 "2023-11-30T14:45:36Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [November 30, 2023, 5:29pm UTC](https://forum.dynamobim.com/t/textnote-boundingbox-to-exclude-leader/95937/10 "2023-11-30T17:29:07Z")

</div>

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.

> **[Take Dynamo Further 🚀](https://dynamopythonprimer.gitbook.io/dynamo-python-primer/)**
>
> Using Python will take your Dynamo definitions to the next level
