Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66666

Re: How to dismiss popups when going into "EditFamily" from a project.

$
0
0

Okay, I figured out how to set the transaction:

 

using (Transaction t = new Transaction(famDoc = doc.EditFamily( family ),"Open family"))
{
	t.Start();
	FailureHandlingOptions failOpt 
	  = t.GetFailureHandlingOptions();
	failOpt.SetFailuresPreprocessor( 
	  new FamilyOpenIgnoreMessages() );
	t.SetFailureHandlingOptions( failOpt );

	t.Commit();
}

Now I noticed that the code is running like 3-4x slower than before. I'll check it again when I plug my laptop, now it's running on battery, maybe this is the reason?

 

Also I noticed that I could dismiss only the popups with "OK" option available, The ones with disabled "OK" are still showing up. I used FailureMessageAccessor.DeleteAllWarnings() . And I believe "delete" means "click ok" in this case, right?


Viewing all articles
Browse latest Browse all 66666

Trending Articles