Grouping Clashes Programmatically

Grouping Clashes Programmatically

Anonymous
Not applicable
1,394 Views
1 Reply
Message 1 of 2

Grouping Clashes Programmatically

Anonymous
Not applicable

Hi,

 

I'm trying to automate some simple clash detection functions, and would like Clash Detective to automatically organize clashes into folders based on certain criteria (grouping them as you can within the Clash Detective GUI). I've rewritten AUTO_04 (helpful tutorial btw - thanks) in C# successfully, and am now trying to tailor it to my purposes.

 

I've been able to retrieve information about what group a clash has already been placed in, but the variable is read-only.

 

m_clash.RunAllTests();
foreach (ComApi.InwOclClashTest clashTest in m_clash.Tests())
     {
foreach (ComApi.InwOclTestResult2 clashResult2 in clashTest.results())
             {
MessageBox.Show(Autodesk.Navisworks.Api.Application.Gui.MainWindow, "clashResult2.GroupPath = " + clashResult2.GroupPath); }
}

How can I set InwOclTestResult.GroupPath? (I know it's a read-only variable - is there a workaround?)

0 Likes
1,395 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support

GroupPath was just added in 2012  to provide the ability to know if this is a group and which results are within the group. No COM API can move the results to a group or create a group. The situation is same in 2013. But 2013 provides .NET API for ClashTest. It has the ability to manage group. Please refer to <NW 2013>\api\ examples\PlugIns\ClashDetective

0 Likes