How to retain annotations in Revit when switching elements?

Hi everyone,

I’ve created a script using Grasshopper inside Rhino.Inside.Revit to add annotations to certain views in Revit. Specifically, I’m working with filled regions that I need to subdivide into triangles to demonstrate their surface area.

Here’s how the script currently works:

  • It reads all the filled regions within a specific view.
  • Then, using a number slider, I select one filled region.
  • That region is divided into triangles.
  • Each triangle is numbered, and its sides and height are dimensioned.
  • The perimeter and height of each triangle, along with triangle numbers and dimensions, are added back into Revit as text notes and model lines (I used text notes instead of aligned dimensions because I couldn’t get dimension elements to work properly).

The issue I’m facing is this: when I move from one filled region to the next (by changing the slider), all the annotations (texts and lines) from the previous one are deleted or overwritten. The same thing happens when switching from one view (floor/level) to another — the annotations are lost or regenerated for the new view only.

What I’d like to do is adapt the script so that the annotations created for each region are retained in Revit, even after I move on to the next one. Ideally, I want to:

  • Process a filled region,
  • Save the resulting annotations in Revit,
  • Move on to the next filled region in that view,
  • And once all are done, continue to the next view.

Does anyone have suggestions on how to modify the workflow or script logic to persist these annotations between operations?

I’m attaching a screenshot of my script for reference.

Thanks in advance!

HI Giovanni,

If you post an example we might be able to help with this aspect..

To create a new dimension via the slider you will need to disable the Element Tracking