Reducing number of triangles in a Revit model using Dynamo

Hello all !

I am a new user of Dynamo and would like to know how I can reduce the number of triangles of selected elements in a Revit model using the Dynamo script.

There was a similar problem here : [Reduce Mesh], but in this case I would like to bring the selected elements and then extract meshes from those Revit elements in Dynamo instead of importing .obj file. Is this possible ? If so what steps do you suggest I take ?

Please let me know if you require any clarifications :slight_smile:

Like this?



Meshmixer solved this problem for me
I love the Shaping tool in meshmixer, made me feel like a sculpter :slight_smile:
I needed that when i was modeling rocks and outcrops (in Revit)
I used the STL file-format.

Many thanks John !!! I will give this a try :slight_smile:

Hello John,

I get the following error message,


I guess I have a lot of complex furniture geometries with curved surfaces and more is required in the script?

What does element.geometry do?

Unfortunately I get the same error message


I come across that error frequently when working with large objects and meshes in Dynamo, and it tends to be a bit of a dead end for me. From what I can gauge it’s related to naked edges, possibly falling within a tolerance range that Revit or Dynamo have applied to them in order to close that edge and its related faces.

Commenting on this thread so I can follow the outcome or reasoning behind it if it’s determined.

1 Like

It’s pretty much this - the geometry contained in the Revit import is broken on the Dynamo end, either as a result of how Revit imported it, stored it, or sent it back to Dynamo. Revit has reduced tolerances from what is needed for mfg (by design and a good thing) which means that it has implemented a LOT of ‘ignore that issue and fake it this way’ code dealing with geometry stuff over the years. You can see these as dbg_info statements in Revit journals around geometry stuff.

There are ways around this, but they will all entail using the exporter to get good geometry out of the file prior to bringing it into Dynamo and using that.

@faisal.ramady what is your end goal after bringing the reduced complexity mesh into Dynamo?


Hi Jacob,

Thank you for confirming Gavin’s explanation. Just to give you the bigger picture we are trying to get the a BIM federation uploaded to a cloud based platform where we can view the model in the browser. There are memory constraints in the browser (up to 3GB) and the furniture in the building takes up >90% of the total memory. We would like to reduce the complexity of the furniture using dynamo and bring the simplified furniture’s back into the Revit federation so we can upload into the platform. I am open to any suggestions at this point :slight_smile:

It seems related to this thread:

1 Like

You can also look at Dynamo Core 2.13 - Release (Parts 1, 2 and 3) - #28, specifically the replies by @Karam_Baki and check out his package Synthesize Toolkit to see if this resolves your issue.

In particular, look for the K-Family Insert and Dynamo Geometry To Revit Compatibility nodes.


Thanks John,

I believe the code works when you only have geometries with planar surfaces, I have furniture (with those wheel chairs) that have curved surfaces. I ran the python script for fun and I get the following error message fyi .

Thanks Solamour, I will take a look :slight_smile:

1 Like

I think the process would have to be something like:

  1. Get all the over-modeled furniture families in the document, and save them out to a new rfa (save as library is best for this) so you have a backup and to give you something you can more readily process in chunks.
  2. For each furniture family in the document, open the family document, get the mesh geometry from the 3D view, and export to an intermediate file format (ie: .sat, .obj) which Dynamo can import.
  3. Import the intermediate file and process it to simplify the number of faces.
  • There is no “easy button” for this, so if you don’t want to spend awhile focusing on the ins and outs of mesh editing, consider processing them with something like meshmixer.
  1. Delete the mesh geometry elements, and import the edited mesh as a new direct shape.
  • If you went the external processing method, you can restart at #2, and import from the edited eternal mesh instead.
  1. Save the family as a new .rfa, and load it into the file.

A better solution would be to use a more robust cloud platform, or to disable the furniture display entirely and use a simplified version generated externally from Revit for your geometry display (ie: export a 3D view of just the furniture to FormIt, edit there and import that into your cloud platform).

1 Like

I solved this in the past.

You can use 2 nodes from Synthesize to do the job.

Element.Geometry Fixer
(It processes element one by one)
-Each element has equivalent matching list, useful for selective and specific requirements that needs the original element id.

Element.Geometry Fast
(It processes batch elements as one)
-Extremely fast, but doesn’t keep the list matching the original elements.