Navisworks API

Reply
Member
anzi
Posts: 3
Registered: ‎03-24-2011
Message 1 of 4 (283 Views)

Clash image

283 Views, 3 Replies
06-17-2012 04:07 AM

Hi,

 

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?

 

Regards,

 

Andrew

ADN Support Specialist
xiaodong.liang
Posts: 1,307
Registered: ‎06-12-2011
Message 2 of 4 (227 Views)

Re: Clash image

08-21-2012 07:15 PM in reply to: anzi

Hi,

 

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.

 



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Active Member
dupuisj
Posts: 6
Registered: ‎08-21-2012
Message 3 of 4 (208 Views)

Re: Clash image

08-28-2012 01:19 PM in reply to: xiaodong.liang

Hi,

 

I also would like to have some information on that if there is a solution.  I'm triing to create my own clash report.

 

Thanks!

ADN Support Specialist
xiaodong.liang
Posts: 1,307
Registered: ‎06-12-2011
Message 4 of 4 (174 Views)

Re: Clash image

09-12-2012 12:02 AM in reply to: dupuisj

Hi,

 

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.

 

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



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!