IExportContextOnViewBegin Method |
This method marks the beginning of a 3D view to be exported.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
SyntaxRenderNodeAction OnViewBegin(
ViewNode node
)
Function OnViewBegin (
node As ViewNode
) As RenderNodeAction
RenderNodeAction OnViewBegin(
ViewNode^ node
)
abstract OnViewBegin :
node : ViewNode -> RenderNodeAction Parameters
- node ViewNode
-
Geometry node associated with the view.
Return Value
RenderNodeAction
Return RenderNodeAction.Skip if you wish to skip exporting this view,
or return RenderNodeAction.Proceed otherwise.
Example
public RenderNodeAction OnViewBegin(ViewNode node)
{
View3D theView = m_document.GetElement(node.ViewId) as View3D;
string viewName = theView.Name;
ViewOrientation3D theOrientation = theView.GetOrientation();
CameraInfo camera = node.GetCameraInfo();
bool isPerspective = camera.IsPespective;
RenderingSettings renderSettings = theView.GetRenderingSettings();
BackgroundStyle bkStyle = renderSettings.BackgroundStyle;
SunAndShadowSettings sun = theView.SunAndShadowSettings;
bool needToExportLight =
(renderSettings.LightingSource != LightingSource.ExteriorSun) &&
(renderSettings.LightingSource != LightingSource.InteriorSun);
return RenderNodeAction.Proceed;
}
public void OnViewEnd(ElementId elementId)
{
}
See Also