hello guys
I have this code, and when running in in CATIA it gave me an error, hope you can help me
Dim oFoundEdges
Set oFoundEdges = New Collection '(the component active x can not create the object "collection")
For j = 1 To osel.Count
sEdgeName = osel.Item(j).Value.name
Dim aEdgeName
aEdgeName = Split(sEdgeName, "face")
sEdgeName = "face" & aEdgeName(UBound(aEdgeName))
If sEdgeName = "*" & sFaceName1 & "*" & sFaceName2 & "*" Then
Dim Edge
Set Edge = osel.Item(j).Value
oFoundEdges.Add Edge
iFoundEdges = iFoundEdges + 1
End If
Next
osel.Clear
If Not iFoundEdges = 0 Then
For j = 1 To oFoundEdges.Count
osel.Add oFoundEdges.Item(j)
Next
data_file.WriteLine "Numero de aristas"
data_file.WriteLine (iFoundEdges)
data_file.WriteLine "--------------------------------------"
'Else
'MsgBox "La figura no tiene aristas"
End If
I don't know what to do,
hope you can help me
thanks
I have this code, and when running in in CATIA it gave me an error, hope you can help me
Dim oFoundEdges
Set oFoundEdges = New Collection '(the component active x can not create the object "collection")
For j = 1 To osel.Count
sEdgeName = osel.Item(j).Value.name
Dim aEdgeName
aEdgeName = Split(sEdgeName, "face")
sEdgeName = "face" & aEdgeName(UBound(aEdgeName))
If sEdgeName = "*" & sFaceName1 & "*" & sFaceName2 & "*" Then
Dim Edge
Set Edge = osel.Item(j).Value
oFoundEdges.Add Edge
iFoundEdges = iFoundEdges + 1
End If
Next
osel.Clear
If Not iFoundEdges = 0 Then
For j = 1 To oFoundEdges.Count
osel.Add oFoundEdges.Item(j)
Next
data_file.WriteLine "Numero de aristas"
data_file.WriteLine (iFoundEdges)
data_file.WriteLine "--------------------------------------"
'Else
'MsgBox "La figura no tiene aristas"
End If
I don't know what to do,
hope you can help me
thanks