Create section box for all clashes in the saved viewpoints

Create section box for all clashes in the saved viewpoints

16164BDZVH
Explorer Explorer
414 Views
1 Reply
Message 1 of 2

Create section box for all clashes in the saved viewpoints

16164BDZVH
Explorer
Explorer

Hi everyone,

After running a clash test and exporting it, I am trying to create section boxes for all saved viewpoints since the viewpoints are hard to see. Since there are tons of clashes, any ideas of how to automate it over all of the saved viewpoints using Navisworks API? Below is my code to try to do that but I cannot figure it out:

using Autodesk.Navisworks.Api.DocumentParts;
using Autodesk.Navisworks.Api.Interop;
using Autodesk.Navisworks.Api.Clash;

void createSectioningBox()
        {
            Document doc = Application.ActiveDocument;
            DocumentClash documentClash = doc.GetClash();
            foreach (SavedItem savedItem in documentClash.TestsData.Tests)
            {
                ClashTest clashTest = (ClashTest) savedItem;
                SavedItemCollection savedItemCollection = clashTest.Children;
                foreach (SavedItem item in savedItemCollection)
                {
                    ClashResult clashResult = item as ClashResult;
                    if (clashResult != null)
                    {
                        Point3D centerPoint = clashResult.Center;
                        // Create sectioning box here
                    }

                }

            }
        }

 

 

0 Likes
415 Views
1 Reply
Reply (1)
Message 2 of 2

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @16164BDZVH ,

 

Could you please take a look at the below link?

https://forums.autodesk.com/t5/navisworks-api/enable-section-box-by-using-the-api/td-p/4966628 

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes