Hi everybody I am new to the forum and i was wondering if any of you guys may have some experience in an issue that has been bothering me for quite some time.
Im working on a Macro that does some afterwork on some User's Selected surfaces, it works just fine on the first run, but when i try to cycle it with a For it does not ask me again to select the surfaces. The code in question is this:
Dim CONT1 As integer
For CONT1 = 1 to Total
Dim oSelectionFilter
sMessage = "Select the surfaces to extract for " & hybridBody3.Name
reDim oSelectionFilter(1)
oSelectionFilter(0) = "TriDim"
oSelectionFilter(1) = "Face"
CATIA.ActiveDocument.Selection.SelectElement3 oSelectionFilter, sMessage, True, CATMultiSelTriggWhenUserValidatesSelection, True
Set cInputs (CONT1)= New Col
cInputs(CONT1).Add CATIA.ActiveDocument.Selection.Item(i).Value
Then it stops and ask me for the Selection.
But when the CONT1 hits 2 it reDos it with the geometry selected for Its Value at 1
Does somebody knows how can i Retrigger the selection?
Thanks in advance.
Im working on a Macro that does some afterwork on some User's Selected surfaces, it works just fine on the first run, but when i try to cycle it with a For it does not ask me again to select the surfaces. The code in question is this:
Dim CONT1 As integer
For CONT1 = 1 to Total
Dim oSelectionFilter
sMessage = "Select the surfaces to extract for " & hybridBody3.Name
reDim oSelectionFilter(1)
oSelectionFilter(0) = "TriDim"
oSelectionFilter(1) = "Face"
CATIA.ActiveDocument.Selection.SelectElement3 oSelectionFilter, sMessage, True, CATMultiSelTriggWhenUserValidatesSelection, True
Set cInputs (CONT1)= New Col
cInputs(CONT1).Add CATIA.ActiveDocument.Selection.Item(i).Value
Then it stops and ask me for the Selection.
But when the CONT1 hits 2 it reDos it with the geometry selected for Its Value at 1
Does somebody knows how can i Retrigger the selection?
Thanks in advance.