IExportContextOnInstanceBegin Method |
This method marks the start of processing of an instance node (e.g. a family instance).
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
SyntaxRenderNodeAction OnInstanceBegin(
InstanceNode node
)
Function OnInstanceBegin (
node As InstanceNode
) As RenderNodeAction
RenderNodeAction OnInstanceBegin(
InstanceNode^ node
)
abstract OnInstanceBegin :
node : InstanceNode -> RenderNodeAction
Parameters
- node InstanceNode
-
Return Value
RenderNodeAction
Return RenderNodeAction.Skip if you wish to skip processing this family instance,
or return RenderNodeAction.Proceed otherwise.
Example
public RenderNodeAction OnInstanceBegin(InstanceNode node)
{
ElementId symbolId = node.GetSymbolGeometryId().SymbolId;
FamilySymbol famSymbol = m_document.GetElement(symbolId) as FamilySymbol;
m_TransformationStack.Push(m_TransformationStack.Peek().Multiply(node.GetTransform()));
return RenderNodeAction.Proceed;
}
public void OnInstanceEnd(InstanceNode node)
{
m_TransformationStack.Pop();
}
Public Function OnInstanceBegin(node As InstanceNode) As RenderNodeAction Implements IExportContext.OnInstanceBegin
Dim symbolId As ElementId = node.GetSymbolGeometryId().SymbolId
Dim famSymbol As FamilySymbol = TryCast(m_document.GetElement(symbolId), FamilySymbol)
m_TransformationStack.Push(m_TransformationStack.Peek().Multiply(node.GetTransform()))
Return RenderNodeAction.Proceed
End Function
Public Sub OnInstanceEnd(node As InstanceNode) Implements IExportContext.OnInstanceEnd
m_TransformationStack.Pop()
End Sub
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