IExportContextOnFaceBegin Method |
This method marks the beginning of a Face to be exported.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
SyntaxRenderNodeAction OnFaceBegin(
FaceNode node
)
Function OnFaceBegin (
node As FaceNode
) As RenderNodeAction
RenderNodeAction OnFaceBegin(
FaceNode^ node
)
abstract OnFaceBegin :
node : FaceNode -> RenderNodeAction
Parameters
- node FaceNode
-
An output node that represents a Face.
Return Value
RenderNodeAction
Return RenderNodeAction. Proceed if you wish to receive geometry (polymesh)
for this face, or return RenderNodeAction.Skip otherwise.
Remarks
Note that this method (as well as OnFaceEnd) is invoked only if the custom
exporter was set up to include geometric objects in the output stream.
See
IncludeGeometricObjects for mode details.
Example
public RenderNodeAction OnFaceBegin(FaceNode node)
{
Face theFace = node.GetFace();
double area = theFace.Area;
if (theFace.HasRegions)
{
IList<Face> regionedFaces = theFace.GetRegions();
}
if (true == ExportAFace(theFace))
{
return RenderNodeAction.Skip;
}
return RenderNodeAction.Proceed;
}
public void OnFaceEnd(FaceNode node)
{
}
private bool ExportAFace(Face face)
{
return false;
}
Public Function OnFaceBegin(node As FaceNode) As RenderNodeAction Implements IExportContext.OnFaceBegin
Dim theFace As Face = node.GetFace()
Dim area As Double = theFace.Area
If theFace.HasRegions Then
Dim regionedFaces As IList(Of Face) = theFace.GetRegions()
End If
If True = ExportAFace(theFace) Then
Return RenderNodeAction.Skip
End If
Return RenderNodeAction.Proceed
End Function
Public Sub OnFaceEnd(node As FaceNode) Implements IExportContext.OnFaceEnd
End Sub
Private Function ExportAFace(face As Face) As Boolean
Return False
End Function
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also