#BILTNA2018 Wish granted: Remove warning when modifying type parameter values in schedule

This sample shows how to “Remove warning/pop-up when modifying type parameter values within a schedule” using the DialogBoxShowing event.

Please remove the warning/pop-up that appears when editing scheduled fields that are tied to type parameters.  This is EXTREMELY annoying when entering data for our MEP schedules.  I.E. Plumbing Fixtures, Air Devices, Lighting Fixtures, etc.

The popup reads:

“This change will be applied to all elements of type _______.”

In instances where we are filling out a schedule, we are forced to enter our data, press enter or click out of the cell, and then respond to this popup. EVERY TIME

public void registerWarningSuppresion()
{
    Document doc = this.ActiveUIDocument.Document;   
    Application app = doc.Application;
    UIApplication uiapp = new UIApplication(app);
    uiapp.DialogBoxShowing += new EventHandler(dismissTaskDialog);
}

private void dismissTaskDialog(object sender, DialogBoxShowingEventArgs args)
{
    TaskDialogShowingEventArgs e = args as TaskDialogShowingEventArgs;
    if (e == null)
        return;
    if (e.Message.StartsWith("This change will be applied to all elements of type"))
    {
        e.OverrideResult((int)TaskDialogCommonButtons.Ok);
    }
}
Advertisements

6 thoughts on “#BILTNA2018 Wish granted: Remove warning when modifying type parameter values in schedule

  1. Hi Harry,
    Could you show us how to open a family change subcategories within a nested array that contains generic forms? I have seen posts on modifying parameters in groups however I was wondering if this is possible within a family document. Attempts within the project environment have been met with frustration as the groups tend to move.

  2. Another one i just thought of, can you create and modify subcategories within a family document when the generic forms are inside of a group? further can you swap the linestyle subcategories inside of a group?
    Typically these would be arrayed groups so the other problem is that they might be nested. although most families we deal with have on one nesting level.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s