Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug: Dialog Box Showing Event inconsistent

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
758 Views, 4 Replies

Bug: Dialog Box Showing Event inconsistent

I'm trying to dismiss all dialog boxes when opening a Revit document. During opening of a RVT file the dialog box showing event does not trigger for all dialogs, only some, making process that run overnight hang on dialogs. 

 

Note that the dialog box opening event does trigger for the same dialog boxes while working in a RVT file just not when opening the file, making the event inconsistent. I would like the event to trigger for all dialog boxes at all times.

 

Per the building coder (https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b) I have created a simple application macro to display this behavior and steps to reproduce. Can the powers that be forward this onto the development team?

 

Step 1: Create application macro

/*
 * Created by SharpDevelop.
 * User: mwilson
 * Date: 10/25/2018
 * Time: 11:43 AM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Events;
using Autodesk.Revit.UI.Selection;
using Autodesk.Revit.UI.Events;
using System.Collections.Generic;
using System.Linq;

namespace test
{
    [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
    [Autodesk.Revit.DB.Macros.AddInId("A5ECF3C3-8445-4E9D-A310-D6E1572A7C36")]
	public partial class ThisApplication
	{
		private void Module_Startup(object sender, EventArgs e)
		{
					
			this.DialogBoxShowing += new EventHandler<DialogBoxShowingEventArgs>(HandleDialogBoxShowing);
		}

		private void Module_Shutdown(object sender, EventArgs e)
		{
			this.DialogBoxShowing -= new EventHandler<DialogBoxShowingEventArgs>(HandleDialogBoxShowing);
		}
		public static void HandleDialogBoxShowing(object sender, Autodesk.Revit.UI.Events.DialogBoxShowingEventArgs dialogargs)
        {
		System.Windows.Forms.MessageBox.Show("Dialog Box Event triggered.");
           //code to close the dialogs would go here... but it doesn't always trigger during opening of document
        }
		#region Revit Macros generated code
		private void InternalStartup()
		{
			this.Startup += new System.EventHandler(Module_Startup);
			this.Shutdown += new System.EventHandler(Module_Shutdown);
		}
		#endregion
	}
}

Step 2. Add reference in macro to System.Windows.Forms and compile.

Step 3. Place attached RVT file and DWG file into the same folder. Open Revit then select File -> Open and select the RVT file. 

Step 4. Notice that the dialog box showing event is NOT triggered for "Some elements were lost during import. ActiveX..." and "Import detected no valid elements in the file's Model space..." dialog boxes. But is for other warning of missing links.

Step 5. Within Revit select Insert -> Manage Links. Select the "CAD Formats" tab, select the linked DWG file and click "Reload". 

Step 6. Notice that the dialog box showing event IS triggered for "Some elements were lost during import. ActiveX..." and "Import detected no valid elements in the file's Model space..." dialog boxes." 

Step 7. Please help.

 

The same behavior is observed when creating a visual basic project with addin file, the macro has just been created to show a simple case of the problem.

 

Much obliged. 

4 REPLIES 4
Message 2 of 5
JimJia
in reply to: Anonymous

I am sorry to say that I can reproduce this issue as well 😞 
I submitted the issue item REVIT-139696 [Dialog Box Showing Event inconsistent - case 14750543] on your behalf for the functionality you suggest, as this issue requires exploration and possibly a modification to our software. Please make a note of this number for future reference.
You are welcome to request an update on the status of this issue or to provide us with additional information at any time quoting this issue item number.
This issue is important to me. What can I do to help?
This issue needs to be assessed by our engineering team, and prioritized against all of the other change requests that are outstanding. As a result any information that you can provide to influence this assessment will help. Please provide the following where possible:
• Impact on your application and/or your development.
• The number of users affected.
• The potential revenue impact to you.
• The potential revenue impact to Autodesk.
• Realistic timescale over which a fix would help you.
• In the case of a request for a new feature or a feature enhancement, please also provide detailed Use Cases for the workflows that this change would address.
This information is extremely important. Our engineering team have limited resources, and so must focus their efforts on the highest impact Change Requests. We do understand that this will cause you delays and affect your development planning, and we appreciate your cooperation and patience.

 


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
Message 3 of 5
dantartaglia8696
in reply to: JimJia

Hi,

Has there been any progress on this?

 

Thanks,

Dan

 

Message 4 of 5
carolina.machado
in reply to: JimJia

Is there any update on this issue?

Message 5 of 5
adam.nagy
in reply to: Anonymous

Supposedly this issue was fixed in Revit 2020



Adam Nagy
Autodesk Platform Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report