Well, this is a coding tip and I beliеve its a nice and useful tip for all max scripters. It's about some limitation of
addModifier function that
does not preserve the sub-object selection that might be active in the modifier stack when adding the modifier.
Btw, it's a bit strange to see that this limitation of
addModifier lie in Max from version 3 to the nowadays, nm, however, if we want to preserve the sub-object selection when we add a modifier, the help docs suggest to use the
modPanel.addModToSelection() method. That's correct, but for non scripters need to say that we try to avoid
modPanel interface in our coding always then its possible, mostly for good performance but and by other issues.
So, the solution that I have (and share it into
Autodesk Area forum) to preserve the sub-object selection (without
modPanel) is just to add
Turn To Mesh modifier. That's it. Simple and effective.