# Create elements from geometry in dynamo and export image (python)

**URL:** <https://forum.dynamobim.com/t/create-elements-from-geometry-in-dynamo-and-export-image-python/47688>\
**Category:** Developers\
**Tags:** revit, python, dynamo\
**Created:** [March 5, 2020, 9:23am UTC](https://forum.dynamobim.com/t/create-elements-from-geometry-in-dynamo-and-export-image-python/47688 "2020-03-05T09:23:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DomE](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@DomE](https://forum.dynamobim.com/u/DomE)\
**Post date:** [March 5, 2020, 9:23am UTC](https://forum.dynamobim.com/t/create-elements-from-geometry-in-dynamo-and-export-image-python/47688/1 "2020-03-05T09:23:28Z")

</div>

Hi folks,

I have created a series of geometry (with colors) in Dynamo. My goal is to save pictures of these.

Since it is not possible, based on my knowledge, to export a series of dynamo backgrounds automatically, I was trying to loop through the geometry designs from a python script.  
For each design I try to:

1. Convert geometry to element in Revit
2. Override color in view (not standard)
3. Save images
4. Delete the geometry (and start again)

For step 1, I tried to export sat and re-import them, but I didn’t manage to color them (through OverrideGraphicSettings(), ogs.SetSurfaceForegroundPatternColor() ogs.SetSurfaceForegroundPatternVisible() ) because the sat file has no Surface to color. Then I thought about using Family, but I cannot find anything in Revit API to CREATE a family from geometry.

For step 2, as mentioned before, I use view.SetElementOverrides() because i need to put color in a different 3D view (not current view). I believe this can work.

For step 3 I use doc.ExportImage(). This can work as well.

Nothing to say about step 4.

In order for this plan to work, I need to solve step 1. Do you have any suggestions on solving step 1?  
I would also appreciate your opinion on making this entire workflow more efficient.  
Please note, OOTB node are not an option for me because this is a small part of a bigger workflow developed in python.

Thanks in advance!

---

<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:** [March 5, 2020, 11:20pm UTC](https://forum.dynamobim.com/t/create-elements-from-geometry-in-dynamo-and-export-image-python/47688/2 "2020-03-05T23:20:00Z")

</div>

I would recommend you look into capturefinery which does much of this. If your shapes are flat you could also export to SVG as another method.
