Loop Through Clash Results in ComAPI

Loop Through Clash Results in ComAPI

Anonymous
Not applicable
864 Views
2 Replies
Message 1 of 3

Loop Through Clash Results in ComAPI

Anonymous
Not applicable

Is it possible to loop through clash results in ComAPI with a for loop (not a foreach loop)?  The approach below does not seem to work.

for (int i = 0; i < ComApi.InwOclTestResult.results().Count; i++)
{
if (i == 30)
{
ComApi.InwOclTestResult oRes = ComApi.InwOclTestResult.results()[i];
//do something
}
}


 

This method seems to work well, but I am unable to access a clash result by it's index:

foreach (ComApi.InwOclTestResult varialbe in ComApi.InwOclTestResult.results())
{
//do something
}

 

 

0 Likes
Accepted solutions (1)
865 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

I figured it out from this blog:

 

http://adndevblog.typepad.com/aec/2012/09/workaround-to-export-image-of-clash-result.html

 

It looks like the clash result's indexing starts at 1 instead of 0.  Thanks!

Message 3 of 3

Anonymous
Not applicable

Hello. I have just started learning Navisworks development, and I only know about plug-ins. I learned a lot from this code. Thank you very much.
However, my level is limited. If I can, can I provide complete code?
At the same time, can you provide COM API reference manual download? You can't find it online.
Thanks again.
Tennicse@126.com

 

您好。我刚刚开始学习Navisworks开发,仅仅对插件有所了解。这一段代码让我学到了很多,非常感谢。
不过,我的水平还是有限,如果可以,是否能够提供完整的代码?
同时能否提供COM API参考手册下载?网上找不到。
再次感谢。
tennicse@126.com

0 Likes