Message 1 of 2
Create section box for all clashes in the saved viewpoints
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
}
}
}
}