Check Interference between Faces (VBA)

Hello,

I am working on 3D Model in Solidworks. I would like to know the interference between two faces from differents parts ( like Face1 of Body1 interfere with Face1 of Body2 for example). I would like to check Interference between faces automatically with a macro on Visual Basic For Application. I try a macro but it doesn't work, someone can help me please?

 

Thank you so much.

 

Hello,

What line of code returns an error ?

What type of this error ?

Good day

1 « J'aime »

Hello,

I didn't manage to get some time for an in depth look at the code, but I have to remarks :

First, there is a sample code in the Solid help that uses ToolsCheckInterference2 instead of ICheckInterference3.

Check here for syntax : http://goo.gl/XpqGvH

Check here for the sample : http://goo.gl/swzFlH

Moreover, when using ICheckInterference3, a remark in the help (http://goo.gl/ZFJkDc) recommend to call IModeler::ICheckInterferenceCount3 (http://goo.gl/5cRR4Q) before, to allocate memory for the arrays returned from this method.

So maybe that's why your macro didn't work.