I am new to NAvisWorks. I have Integrated the navis Viewer in my web application. Now I want to list all the clashes and display them in a Dropdown. I found a example in the code sample. But Converting same code in C# is giving me many errors like Conversion errors. I code a wrote is :
Code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NavisWorksAPI6;
public partial class _Default : System.Web.UI.Page
{
nwOpState m_state;
InwOpClashElement m_clash = null;
protected void Page_Load(object sender, EventArgs e)
{
try
{
m_state = new NavisWorksAPI6.nwOpState();
foreach (InwPlugin plugin in m_state.Plugins())
{
if (plugin.ObjectName == "nwOpClashElement")
{
m_clash = plugin;
}
}
if (m_clash == null)
{
Response.Write("Failed to find clash detective");
}
m_clash.RunAllTests("gatehouse.nwd");
foreach (InwOclClashTest clashTest in m_clash.Tests())
{
ListBox1.Items.Add("# CLASH TEST - " + clashTest.name + "#");
ListBox1.Items.Add("New Result:" + clashTest.NumNewResults);
foreach (InwOclTestResult clashResult in clashTest.results())
{
ListBox1.Items.Add("- RESULT[" + clashResult.name + "] Status[" + clashResult.status + "]");
}
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
Can anyone tell me whats wrong?
Thanks in advance.