Results 1 to 1 of 1

Thread: How to import the list of clashes and put them as dropdown?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    2008-09
    Posts
    7
    Login to Give a bone
    0

    Post How to import the list of clashes and put them as dropdown?

    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.
    Last edited by RobertB; 2008-09-19 at 03:35 PM. Reason: Please use code tags

Similar Threads

  1. Give me the ability to import a saved list of worksets
    By Wish List System in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2012-08-16, 06:04 PM
  2. 2012: Properties dropdown
    By jonathanschade in forum Revit - Platform
    Replies: 2
    Last Post: 2012-08-10, 03:05 PM
  3. Export list of Import or Linked CAD Symbols
    By luke.s.johnson in forum Revit Architecture - General
    Replies: 8
    Last Post: 2010-08-02, 06:29 PM
  4. Open windows not on dropdown list
    By dduarte in forum Revit Architecture - General
    Replies: 3
    Last Post: 2009-04-03, 03:51 AM
  5. Dropdown Database List
    By gapple in forum AutoCAD Customization
    Replies: 2
    Last Post: 2005-09-22, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •