Normal behavior is that Progress is displayed when performing long operations, even during Automated actions.
Calling this method changes behaviour such that Progress is not displayed in such cirmumstances.
Namespace: Autodesk.Navisworks.Api.Automation
Assembly: Autodesk.Navisworks.Automation (in Autodesk.Navisworks.Automation.dll)
Syntax
| Visual Basic |
|---|
Public Sub DisableProgress |
| C# |
|---|
public void DisableProgress() |
| Visual C++ |
|---|
public:
void DisableProgress() |
Examples
CopyMerging Files into a Navisworks Document
Autodesk.Navisworks.Api.Automation.NavisworksApplication automationApplication = null;
try
{
string workingDir = System.IO.Directory.GetCurrentDirectory().TrimEnd('\\');
automationApplication =
new Autodesk.Navisworks.Api.Automation.NavisworksApplication();
automationApplication.DisableProgress();
automationApplication.OpenFile(workingDir + "\\hello.dwg", workingDir + "\\world.dwg");
automationApplication.SaveFile(workingDir + "\\hello_world.nwd");
automationApplication.EnableProgress();
}
catch (Autodesk.Navisworks.Api.Automation.AutomationException e)
{
System.Windows.Forms.MessageBox.Show("Error: " + e.Message);
}
catch (Autodesk.Navisworks.Api.Automation.AutomationDocumentFileException e)
{
System.Windows.Forms.MessageBox.Show("Error: " + e.Message);
}
finally
{
if (automationApplication != null)
{
automationApplication.Dispose();
automationApplication = null;
}
}
See Also