My first guess is that this is probably an issue of system_bool vs. variant_bool. Basically, sometimes SW returns "-1" for true instead of the numeric equivalent of True which is "1". When you ask "Does -1 = 1?" you always get false.
Any time you're working with booleans in SolidWorks, compare to False. False is always 0.
You're a wizard, Harry. This line fixed it:
If Not swMass.UserAssigned = False Then