I'm having difficulty finding a solution to the following problem. From the forums I have read so far it seems that there may be no solution based on the nature of the command.
Utilizing the following lines of code:
selection1.Search "type=geometric feature,all"
I am getting error windows stating "This element cannot be isolated" for each element selected that can not be isolated. I understand that this is due to the selection containing geometric elements such as pads and pockets that may not be able to be isolated. I do not care about these items. If they exist I am fine with them not being isolated. I would like to just skip over these error windows. The "On Error Resume Next" does not seem to work because I'm guessing it is a Catia error and not a VBA error.
Is there a way to ignore these errors utilizing the CATIA.StartCommand, or is there a better way of isolating any/all features in the CATPart that are able to be isolated? Possibly cyling through each selected item using a For/Next, but the command would still be utilizing a CATIA.StartCommand unless there is another option that I am unaware of? Also, Copy Paste As Result will not work for this particular application either.
This process will be used on dozens or hundreds of parts within the assembly so I would like to keep the process automated.
Any help would be greatly appreciated. Thank you!