Selection Filter API

Morning all,

I'm trying to create a pause in a program that will allow the user to select multiple internal components in an assembly. Some of these components are nested in subassemblies. I have spent some time trying to figure out how to easily do this by allowing the selection of only parts, but with little success. I want to be able to select multiple parts from the graphics area, without creating a property manager page to do so. I am currently going the selection filter route, in which the filter swSelCOMPONENTS does not function the way I would expect. When the user is propted to select parts, the selection filter shows no active filters, and seems to not filter at all. Has anyone else seen anything like this?

I have considered the possibility of selecting the bodies, and causing the API to find the parent component, but I see no need for the additional step, since I am under the impression that I can filter directly for components.

Below is a tiny chunk of my code, I know I am more likely to hear other ways to do this than advice on how to get the selection filter to function properly. I'll take what I can get.

swApp as SldWorks.SldWorks

swApp.SendMsgToUser2 "Select the parts to convert", swMbWarning, swMbOk

params = swApp.GetSelectionFilters
swApp.SetSelectionFilters params, False          'clears filters
params = swApp.GetSelectionFilters

swApp.SetSelectionFilter swSelCOMPONENTS, True          'sets filter to components only

boolstatus = swApp.GetApplySelectionFilter                         'checks application of filters

Thanks in advance,

Tom

SolidworksApi macros