Automating Family Catalog Thumbnail Preview

Hi,

I wanted to have all my family content to have previews set as 3D view. (15K + files.)
I was doing research on this for the past months and it was not easy to achieve due to the fact that I am C# rookie.

I came back to dynamo and started look to get at least 1 family done automatically and the attached image is how far I got. (Yeah, at this point, I am looking into doing it one by one unfortunately.)

My goal is that 1. renames the 3D view as the company catalog standard view, 2. sets the view in correct orientation and 3. save the file with the updated catalog view. (I got #1 working!)

Could you give me some hints on how to achieve this in Dynamo? I believe I combed through all commands and do not see any “save as” nodes.

Thanks much!

1 Like

Hi @robertkang26

arhci-lab has a node to “ExportImageByView” node to get you started.

1 Like

Thank you for the info.

Do you know of any way we can control below item in Dynamo?

HI,

Curious to know if this went anywhere. Looking to do the exact same thing…

Thanks.

1 Like

Hi,

I didn’t get anywhere yet. I’m not sure about others.

  • Robert.

Thanks.

Must be a way to automate this…I’ve been looking and trying different methods - journals etc, but no luck so far…

Hey, did anyone make progress on this?

I’ve managed to change the view to a 3D, close all hidden windows, save the family…
but the active view is still the floor plan!?

1 Like

Hi Josh,

I didn’t. I will ask around though.

1 Like

Still no progress on this?

1 Like

No progress. May be faster to develop an add on.

Is there some progress on this?
Looking to do the smame thing.

Thanks

Turns out on our end we need to hire computer language specialist. Could not do it with Dynamo and downloaded packages.

DocumentPreviewSettings documentPreviewSettings = targetFamilyDocument.GetDocumentPreviewSettings();
            if (documentPreviewSettings.IsViewIdValidForPreview(targetView.Id))
            {
                documentPreviewSettings.PreviewViewId = targetView.Id;
                saveAsOptions.PreviewViewId = targetView.Id;
            }
            documentPreviewSettings.ForceViewUpdate(true);

And then when you save as the family:

targetFamilyDocument.SaveAs(familyFile, saveAsOptions);

This is done in C# above and is just an example. If you wanted that in a Dynamo node, you could always create your own or I could roll this in to my package or another package. If you wanted to swap to Python or something, knock yourself out.

From the one graph above, you would have to do the SaveAs “node” if it was created before terminating the application.