Can't generate .JPG files for multi-level linked RVT files

Can't generate .JPG files for multi-level linked RVT files

impararia
Contributor Contributor
414 Views
1 Reply
Message 1 of 2

Can't generate .JPG files for multi-level linked RVT files

impararia
Contributor
Contributor

Hello

 

We have the following Revit file structure and we are trying to generate by using the following APIs,  JPG files at all levels: at the top level ExportImage & at the children levels GetPreviewImage (on the RevitLinkType).

The GetPreviewImage return a null Bitmap for all low level links.

 

Is-there a way to use another APIs or approach to generate all JPGs for all levels at one time.

 

 

Link LevelNameLink TypeRelated JPG file
0Parent.RVT  Parent.JPG
1Assembly1.RVTAttachementAssembly1.JPG
2Detail11.RVTAttachementDetail11.JPG
2Detail12.RVTAttachementDetail12.JPG
2Assembly11.RVTAttachementAssembly11.JPG
3Detail111.RVTAttachementDetail111.JPG

 

Regards

0 Likes
415 Views
1 Reply
Reply (1)
Message 2 of 2

rosalesduquej
Alumni
Alumni

Hello,

 

So actually this week I had a different question using GetPreviewImage as well and found a couple of limitations with it, where I was getting null back for GroupTypes for example. The way I have used it succesfully before is with FamilyInstances but I have never tried it with Revit files and neither with Linked files. So I have a suggestion for you, if what you want is to create a preview of those Linked files, Why not generate the pictures of the project documents that will look like the default 3D view in Revit yourself.

 

Here is a nice couple of post by Jeremy Tammik where explains how to create those higher quality preview images, you can create it yourself

http://thebuildingcoder.typepad.com/blog/2013/08/setting-a-default-3d-view-orientation.html

 

Here is another discussion about setting the background colour for that very purpose:

http://thebuildingcoder.typepad.com/blog/2013/12/setting-the-view-display-background.html

 

There a lots of examples of that on the blog. Hope you will find this beneficial to what you are trying to do. 

 

Cheers,



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
0 Likes