Pharys
Aerospace
- Jul 29, 2015
- 15
Hi everyone,
So I create this :
If oBodies.Count > 0 Then
Dim m As Integer
For m = 1 To oBodies.Count
If oBodies.Item(m).Name = sHybridBodyName Then
MsgBox "It appears the geometrical set that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If
And I would like to know if I can apply it for parameters.. More precisiely, like this :
If oPart.Parameters.Count > 0 Then
Dim n As Integer
For n = 1 To oPart.Parameters.Count
If oPart.Parameters.Item
.Name = "`Extraction point`" Then
MsgBox "It appears the extraction point parameters that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If
For the moment it doesn't work. My macro proceed but nothing happen when it comes to check if the parameters exists. Any advice would be great.
Thanks to all,
Pharys
PS: I am learning VBA scripting with CATIA since one week, sorry if my questions seems obvious
So I create this :
If oBodies.Count > 0 Then
Dim m As Integer
For m = 1 To oBodies.Count
If oBodies.Item(m).Name = sHybridBodyName Then
MsgBox "It appears the geometrical set that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If
And I would like to know if I can apply it for parameters.. More precisiely, like this :
If oPart.Parameters.Count > 0 Then
Dim n As Integer
For n = 1 To oPart.Parameters.Count
If oPart.Parameters.Item
MsgBox "It appears the extraction point parameters that this macro creates already exists in the part. Unable to proceed.", vbCritical, "Error"
Exit Sub
End If
Next
End If
For the moment it doesn't work. My macro proceed but nothing happen when it comes to check if the parameters exists. Any advice would be great.
Thanks to all,
Pharys
PS: I am learning VBA scripting with CATIA since one week, sorry if my questions seems obvious