Example #1
0
        // OnViewEnd marks the end of a 3D view being exported.
        // This method is invoked even for 3D views that were skipped.
        public void OnViewEnd(
            ElementId InElementId             // exported 3D view ID
            )
        {
            // Forget the active Revit document being exported.
            PopDocument();

            // Check if this is regular file export.
            if (DirectLink == null)
            {
                // Build and export the Datasmith scene instance and its scene element assets.
                DatasmithScene.ExportScene(CurrentDatasmithFilePath);

                // Dispose of the Datasmith scene.
                DatasmithScene = null;
            }
            else
            {
                DirectLink.OnEndExport();
            }

            // Forget the 3D view world transform.
            WorldTransformStack.Pop();
        }