How to get the modified view information of a clash result group?

burkhard.walger
Contributor

How to get the modified view information of a clash result group?

burkhard.walger
Contributor
Contributor

Hello,

I need a way to get the information of a clash detective result groups view with the redlines etc..

To create the state:

  1. Run a test
  2. Group some clash results into a new group
  3. Click the group entry
  4. Adjust the view and create redlines
  5. A camera symbol appears in the clash group line signaling the modified view data

My question is: If and how can I access this information?

  1. In .NET-API a ClashResultGroup does not expose a Viewpoint property.
  2. In COM-API InwOclTestResult has a ViewPoint property. In the documentation there is a clue that InwOclTestResult could be used to get the analogon to both ClashResult and ClashResultGroup (IClashResult objects). Iterating the InwOclClashTest.results() collection returns plain clash results only, no groups. Grouped clashes have a GroupPath property showing the name of the group they are in but no group object property.
  3. .NET IClashResult objects have a HasSavedViewpoint and HasRedlines property but no Viewpoint or Redline.
  4. If such clash result groups are exported to the SavedViewpoints collection access to the viewpoint and redlines are possible. How can the export be accomplished by means of .NET or COM API?

So I'm kind of stuck. Can someone please shade some light on this? I would appreciate an answer too saying it is not possible so that I can stop searching.

 

Thanks

0 Likes
Reply
578 Views
3 Replies
Replies (3)

mtrainottiGHXJH
Enthusiast
Enthusiast

I am on the same issue, did you ever find a solution to this ?

0 Likes

burkhard.walger
Contributor
Contributor
Hi,
no, I did not find a solution. Meanwhile I'm convinced it is impossible (for now only, I hope).
As a workaround we advise our "clash coordinator" to "report" the clashes into saved viewpoints and we use that within our programs/plugins.
HTH,
Walger
0 Likes

mtrainottiGHXJH
Enthusiast
Enthusiast

Hey man! I found a solution to my problem and this should prove useful to you as well. This does not exist in any documentation on the internet nor and examples in the sdk, so do not ask how I figured this out lol.

You can get an instance of the clash highligher w/ : LcClClashResultHighlighter _highlighter = LcClClashResultHighlighter.GetInstance((LcOpState)Autodesk.Navisworks.Api.Application.MainDocument.State);

On the highlighter there are various methods to view/ update the viewpoint of SavedItems.

In particular, _highlighter.HighlightResult((SavedItem)YourClashResultGroupHere, (ClashTest)YourClashTestHere), is what is used in COM to provide the action to highlight a result when you click on a clashresult/group. From here, you can apply methods to get the viewpoint/redlines I.E. doc.CurrentViewpoint.ToViewpoint() or update the items viewpoint by changing your documents viewpoint and then using _highlighter.SaveCurrentResultView();

Best of luck on your plugin and feel free to message me if you need any assistance!