I'm making a macro in CATIA using catscript. After a pad is made the user select a face and then the programs runs an operation in each face of the pad except if it is the one the user selected. I'm using a for loop, but when I try to use the statement "Continue For", I get a compilation error. Does anyone know why I'm getting the error? Also, if that statement can't be used in CATScript, is there any way of achieving that?
For I = 2 To nCaras
strReferenceBRepName = "RSur:(Face:(Brp:(Pad.1;0:(Brp:(Sketch.1;" & I & ")));None:();Cf11:())"
MsgBox(strReferenceBRepName)
If strReferenceBrepName = strBRepName Then
MsgBox("La cara seleccionada es la " & I )
Continue For
End If
Set myReference(I) = part1.CreateReferenceFromBRepName(strReferenceBRepName & ";WithTemporaryBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", myDraft(I-1))
myDraftDomain(I).AddFaceToDraft myReference(I)
Set myDraft(I) = shapeFactory1.AddNewDraft(myReference(I), reference3, catNoneDraftNeutralPropagationMode, reference1, 0.000000, 0.000000, 1.000000, catStandardDraftMode, 45.000000, catNoneDraftMultiselectionMode)
Set myDraftDomains(I) = myDraft(I).DraftDomains
Set myDraftDomain(I) = myDraftDomains(I).Item(1)
myDraftDomain(I).SetPullingDirection 0.000000, 0.000000, 1.000000
myDraftDomain(I).PullingDirectionElement = reference4
part1.Update
Next
I have tried the program and it does recognize the face (that's why the MsgBox is there). Thank you in advance.