I read this post: http://thebuildingcoder.typepad.com/blog/2010/05/get-type-id-and-preview-image.html
and can create a preview image of a family instance, however, the image is quite vague no matter how I cange the piexl or QualityLevel value. Is there any way to create a more clear image using API? using rendering?
Thanks,
Dear Kukuzry,
I guess the built-in family preview image is what it is, so you have to decide whether to take it or leave it.
If you would klike a higher quality preview image, you can create it yourself, as discussed here:
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.
I hope this helps.
Cheers,
Jeremy
I am trying to export a 3d revit model family image for a thumbnail using the revit api. I have tried to turn on the model edges so that they are displayed as darker lines and I have tried to turn on anti-aliasing so that lines are smoothed. I realise it is probably hopeless to switch on the shadows as this option isn't available in a family doc. I have exhausted all the image export options properties. The code below has the export image options and the enumerated revit api properties i have managed to set so far.
if (view3D != null) { views.Add(view3D.Id); var graphicDisplayOptions = view3D.get_Parameter(BuiltInParameter.MODEL_GRAPHICS_STYLE); // Settings for shaded with edges graphicDisplayOptions.Set(3); var detailLevelOptions = view3D.get_Parameter(BuiltInParameter.VIEW_DETAIL_LEVEL); //Settings for view detail, 3 = fine, 2=med, 1=coarse detailLevelOptions.Set(3); } } catch (Autodesk.Revit.Exceptions.InvalidOperationException) { } var ieo = new ImageExportOptions { //Export image file configuration settings FilePath = ImageFamModelFileName, FitDirection = FitDirectionType.Horizontal, HLRandWFViewsFileType = ImageFileType.BMP, ShadowViewsFileType = ImageFileType.BMP, ImageResolution = ImageResolution.DPI_600, ShouldCreateWebSite = false };
I don't know which revit version you are on, but setting the 'thin lines'option before making a preview sometimes helps getting a clearer preview.
Hi spammasterblaster (nice name),
there is no thin lines access in Revit 2015.
There may be a workaround using UIAutomation:
http://thebuildingcoder.typepad.com/blog/2015/03/thin-lines-add-in-using-ui-automation.html
Regards,
Revitalizer
Can't find what you're looking for? Ask the community or share your knowledge.