Normal behavior is that Progress is displayed when performing long operations, even during Automated actions.
This may have been overriden by using
DisableProgress,
If so then calling this method will reinstate normal behavior.
Namespace: Autodesk.Navisworks.Api.Automation
Assembly: Autodesk.Navisworks.Automation (in Autodesk.Navisworks.Automation.dll)
Syntax
| Visual Basic |
|---|
Public Sub EnableProgress |
| C# |
|---|
public void EnableProgress() |
| Visual C++ |
|---|
public:
void EnableProgress() |
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