Message 1 of 6
Hang while exporting DXF

Not applicable
04-07-2021
10:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm getting a hang during an automated export process in my plugin in which I also export a DXF:
mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 688 C#
mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 3320 C#
mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Line 3259 C#
mscorlib.dll!System.Threading.Tasks.Task<Autodesk.Revit.DB.Collaborate.Interface.IProject>.GetResultCore(bool waitCompletionNotification) Line 559 C#
RSCloudClient.dll!Autodesk.Revit.DB.Collaborate.SynchronousManagementClientAccess.GetProjectAndModelName(string region, System.Guid projectId, System.Guid modelId, out string projectName, out string modelName) Unknown
RSCloudClientInterop.dll!<Module>.DLLAccess_RSCloudClientInteropImpl.ManagementClientAccess_getProjectAndModelName(DLLAccess_RSCloudClientInteropImpl* value, AString* region, GUIDvalue* projectId, GUIDvalue* modelId, AString* pProjectName, AString* pModelName) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
RevitDBAPI.dll!Autodesk.Revit.Proxy.DB.DocumentProxy.Export(string folder, string name, System.Collections.Generic.ICollection<Autodesk.Revit.Proxy.DB.ElementIdProxy> views, Autodesk.Revit.Proxy.DB.DXFExportOptionsProxy options) Unknown
RevitAPI.dll!Autodesk.Revit.DB.Document.Export(string folder, string name, System.Collections.Generic.ICollection<Autodesk.Revit.DB.ElementId> views, Autodesk.Revit.DB.DXFExportOptions options) Unknown
> AppliedVR.dll!AppliedVR.Minimap.MinimapExporter.ExportFloorPlansToDXF(System.Collections.Generic.Dictionary<int, Autodesk.Revit.DB.ViewPlan> floorPlans, string path) Line 264 C#
AppliedVR.dll!AppliedVR.Minimap.MinimapExporter.ExportMinimaps(string path, string viewName) Line 68 C#
AppliedVR.dll!AppliedVR.ExportContext.Finish() Line 407 C#
InterfaceUtilAPI.dll!<Module>.Autodesk.Revit.Proxy.DB.IExportContextBridge.Finish_(Autodesk.Revit.Proxy.DB.IExportContextBridge* value) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
InterfaceUtilAPI.dll!Autodesk.Revit.Proxy.DB.CustomExporterProxy.Export(Autodesk.Revit.Proxy.DB.ViewProxy view) Unknown
RevitAPI.dll!Autodesk.Revit.DB.CustomExporter.Export(Autodesk.Revit.DB.View view) Unknown
AppliedVR.dll!AppliedVR.Exporter.Execute(Autodesk.Revit.UI.UIApplication app, Autodesk.Revit.DB.View3D view3D, string exportPath) Line 30 C#
AppliedVR.dll!AppliedVR.App.OnViewActivated(object sender, Autodesk.Revit.UI.Events.ViewActivatedEventArgs e) Line 125 C#
RevitAPIUI.dll!UIApplicationViewActivatedEventHelper.ViewActivatedEventHandler(object sender, Autodesk.Revit.Proxy.UI.Events.ViewActivatedEventArgsProxy args) Unknown
APIUIAPI.dll!<Module>.EventExecutorBase<ViewActivatedEventArgs,Autodesk::Revit::Proxy::UI::Events::ViewActivatedEventArgsProxy>.ExecuteHandlers(object sender, ViewActivatedEventArgs* eventArgs, Autodesk.Revit.Proxy.UI.Events.ViewActivatedEventArgsProxy pManagedArgs, System.Delegate handlers) Unknown
APIUIAPI.dll!<Module>.APIEventObserverBaseProxy<ViewActivatedEventArgs,Autodesk::Revit::Proxy::UI::Events::ViewActivatedEventArgsProxy>.handleEvent(APIEventObserverBaseProxy<ViewActivatedEventArgs,Autodesk::Revit::Proxy::UI::Events::ViewActivatedEventArgsProxy>* value, ViewActivatedEventArgs* eventArgs) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
APIUIAPI.dll!<Module>.SelfRegisteringEventObserver<ViewActivatedEventArgs>.handleBaseEvent(SelfRegisteringEventObserver<ViewActivatedEventArgs>* value, MutableEvent* baseEvent) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
UIFramework.dll!UIFramework.FrameWndManager.MDIFrameWindowProc(System.IntPtr hWnd, int Msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
UIFramework.dll!UIFramework.FrameWndManager.onMDIActivate(System.IntPtr hChildWnd, bool bActivate) Unknown
UIFramework.dll!UIFramework.FrameWndManager.MDIFrameWindowProc(System.IntPtr hWnd, int Msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
UIFrameworkServices.dll!UIFrameworkServices.ManageViewsService.InitialUpdateFrame(System.IntPtr frame, System.IntPtr document, UIFrameworkServices.ViewType viewType, bool bMakeVisiable) Unknown
UIFramework.dll!UIFramework.MFCMDIChildFrameControl.setDocument(object owner, System.IntPtr hWnd, System.IntPtr document, UIFrameworkServices.ViewType viewType) Unknown
UIFramework.dll!UIFramework.MainWindow.openMFCFrameWindow(System.IntPtr hWnd, System.IntPtr document, int viewType) Unknown
UIFrameworkInterop.dll!<Module>.AMainWindowWrapper.openFrameWindow(AMainWindowWrapper* value, CFrameWnd* pFrame, CDocument* pDoc, int viewType) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
APIUIAPI.dll!Autodesk.Revit.Proxy.UI.UIApplicationProxy.OpenAndActivateDocument(string fileName) Unknown
RevitAPIUI.dll!Autodesk.Revit.UI.UIApplication.OpenAndActivateDocument(string fileName) Unknown
AppliedVR.dll!AppliedVR.App.ProcessNextModel() Line 286 C#
AppliedVR.dll!AppliedVR.Process.Initialize.AnonymousMethod__1(object s) Line 44 C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 123 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback(System.Windows.Forms.Control.ThreadMethodEntry tme) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks() Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Unknown
The DXF appears to be created, but the function never returns. Additionally during my export process I'm getting:
If, instead, I export manually through my plugin, then I don't get the permission error and the DXF exports and does not hang - returning naturally from the function call.
My plugin is built for Revit 2021. This is all happening with the rac_basic_sample_project.rvt from Revit 2020 - so a conversion to 2021 does occur. If I export the rac_basic_sample_project.rvt from Revit 2021, I don't get this issue.
Please advise.