AssemblyDocument.CheckInteference

Hallo,

 

Here's some old VB6 code that I can't get to work in .Net - I keep getting an "Incorrect Parameter" error, I think it is the selectedDocs variable...

 

 

Dim solidEdge As SolidEdgeFramework.Application = GetObject(, "SolidEdge.Application")

Dim assemblyDoc As SolidEdgeAssembly.AssemblyDocument

Dim occurrence As SolidEdgeAssembly.Occurrence

Dim selectSet As SolidEdgeFramework.SelectSet

Dim numberOfElements As Integer

Dim selectedDocs() As Object

Dim status As SolidEdgeConstants.InterferenceStatusConstants

Dim comparisonMethod As SolidEdgeConstants.InterferenceComparisonConstants = _

SolidEdgeConstants.InterferenceComparisonConstants.seInterferenceComparisonSet1vsItself

Dim interferingPartsSet1(20) As Object

Dim interferingPartsSet2(20) As Object

Dim numberOfInterferences As Integer

Dim confirmedInterference(20) As Object

Dim interferenceOccurrence As Object

 

assemblyDoc = solidEdge.ActiveDocument

selectSet = assemblyDoc.SelectSet

 

If selectSet.Count > 0 Then

 

numberOfElements = selectSet.Count

ReDim selectedDocs(numberOfElements - 1)

Dim i As Integer

For i = 0 To numberOfElements - 1

selectedDocs(i) = selectSet.Item(i + 1)

Next

 

assemblyDoc.CheckInterference(numberOfElements, selectedDocs, status, comparisonMethod, , , _

True, , , numberOfInterferences, interferingPartsSet1, _

interferingPartsSet2, , interferenceOccurrence)

 

MessageBox.Show("NumInterferences: " & numberOfInterferences)

 

End If

 

Any Ideas???

 

Thanks in advance

Calum

 

Posted by: Calum McLellan
Post date: 10/24/2005 4:28:17 AM

2 REPLIES

RE: AssemblyDocument.CheckInteference

Well I spent the majority of my lunch trying to get the darn thing to work . I'm out of time for now but I'll try to take another looksie at it soon.

 

Posted by: Jason Newell
Post date: 10/24/2005 5:43:04 AM

RE: AssemblyDocument.CheckInteference

Jason,

 

Thanks for the effort, I hope you didn't go hungry

 

Posted by: Calum McLellan
Post date: 10/24/2005 6:14:02 PM