Is there any way to get a clash image as the clash detective does? I tried to run the "PluginExportExample" from the Navisworks COM API 2013 but it creates different images. If clash detection is disabled the images contain all the elements from all the models (basically all the building is shown). If clash detection is enabled I get blank images.
I use the method from the "PluginExportExample" to create an image. I noticed that the example uses the InwOpState method "CreatePicture".
p_state.CreatePicture(anon, Type.Missing, 320, 200) as object
I tried to use the "CreatePicture" method of InwOclTestResult
clash.CreatePicture(anon, Type.Missing, 500, 500);
but I get errors.
What is the right way to get an image of a clash of two elements like clash detective does?
Basically, we will need to get the viewpoint of the InwOclTestResult, get its viewpoint. Because the viewpoint is a InwNvViewPoint, we need to create a InwOpAnonView to use the InwNvViewPoint. Finally call createpiture with the InwOpAnonView.
I did many tests, unfortunately it looks a problem to me. I think you tried with the similar workflow.
I will get back if I make something out.
Sorry, I have not had a worked code with InwOclTestResult.CreatePicture. It looks a problem to me. But I produced a code which could export the viewpoint of the clash result to an image, though it has not the information to show (highlight) the clash entities as what you can see from UI.
I've written it as a blog. Hope it helps a bit.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register