Preview Image of an Assembly in It's Type Image Parameter

Hello Ladies and Gents,

I don’t know if it’s too much to ask from Dynamo or not.
But is there a way that Dynamo can take the preview picture of each assembly as an image file format and put it in the image type parameter of it??

Please see below…

I believe that need to save the image into Revit first, which I’m not sure is doable. Once it’s in the job if you know the element Id then you can set parameter values accordingly.

lets say there are 40 assembly types, i don’t want to do it manually, even if i do, if one of them changes, i have to go update the picture again…

i created a wall schedule and added a text parameter to the wall, then a friend helped me with a graph in dynamo that gets the wall layers and their thickness and puts them in that parameter, now i want to do the same thing with the preview image, so if a layer changes, both the text parameter and image changes at the same time.

first i wanna know if an image preview of an assembly is a parameter or not?
then i wanna know if we can create screenshot in revit with dynamo?

or all these aside, is there a way to do this in another way? like creating a legend and then take it from there maybe?

1 Like

That image isn’t yet in the model, so you would have to export it somehow first. This will add significant file size bloat to your project if not carefully maintained, and as far as I know there are no ways to automate images via the api. Even all elements of category doesn’t catch them all consistently.

As such, you may want to consider other options.

I used a ‘reference’ workset with a 1’-0” long and 1’-0” high wall for all of my wall previously. This was all generated with Dynamo, and as the reference workset was always off never interfered with the main model. It caught EVERY new wall type as well, sorting them by the assigned marks and total thickness. A section was also cut and the reference workset turned on.

The section was manually reviewed for compliance, and notes were added to match our standard details. Tags were given at the bottom of each wall to tie them to the mark value. I could then add my wall types schedule on the same sheet (as you have already set up) and we had an annotated graphical representation to that coordinated.

This one was a fun one :slight_smile:

Workflow is as follows: In Revit create a Legend view with a single wall legend component. With Dynamo > Duplicate legend view per each wall type, change component to respective wall type, export views as images, import images and set parameter value, delete legend views

To avoid pasting all the Python scripts here is the .dyn file: Wall Type Image Creator.dyn (39.4 KB)
edit: ImageType.Load is from the package Prorubim. Any other custom nodes are Clockwork, Archi-lab and DanEDU

Definitely check your file size before and after running as @JacobSmall mentioned it will increase file size. When I ran this with the images fit to 1000 pixels, for 26 wall types, it added about 500 KB



all i can say is, if you were a prophet, i would be your first follower!!!

your brain is pure genius!!!

i’m speechless


Is there a way to load the images from a path without load them in the revit project? I want to insert them in a Revit family only and I dont want to store them 2 times