Skip to content

Commit

Permalink
set the view display background colour in CmdExportImage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Tammik committed Dec 19, 2013
1 parent eb9da6e commit 0c13b90
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions BuildingCoder/BuildingCoder/CmdColumnRound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@

#region Namespaces
using System;
using System.Linq;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Structure;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using System.IO;
#endregion // Namespaces

namespace BuildingCoder
Expand Down
8 changes: 8 additions & 0 deletions BuildingCoder/BuildingCoder/CmdExportImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ static string ExportToImage( Document doc )

if( view3D != null )
{
// Ensure white background.

Color white = new Color( 255, 255, 255 );

view3D.SetBackground(
ViewDisplayBackground.CreateGradient(
white, white, white ) );

views.Add( view3D.Id );

var graphicDisplayOptions
Expand Down
4 changes: 2 additions & 2 deletions BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion( "2014.0.106.0" )]
[assembly: AssemblyFileVersion( "2014.0.106.0" )]
[assembly: AssemblyVersion( "2014.0.106.1" )]
[assembly: AssemblyFileVersion( "2014.0.106.1" )]

0 comments on commit 0c13b90

Please sign in to comment.