Oxana,
Let's start a new part (your cube) and let's call it CUBE.PRT.
DO NOT PERFORM ANY MASS CALCULATION.
If you go to PRO/Program, at the end of the file, are the following statements:
MASSPROP
END MASSPROP
Steve said you must put the name of the part between the two statements:
MASSPROP
PART CUBE.PRT
END MASSPROP
Now, go to relations and add the following statement:
part_weight = mp_mass(""
Now, go to RELATIONS->EVALUATE->in the input window type: part_weight
SURPRISE! The resutlt is 0! Now regenerate once again. Evaluate your variable "part_weight" and you will obtain the good value. You ask yourself what happened?
As you can see, if you open the PRO/PROGRAM, you will see that your relation part_weight=mp_mass(""

is almost at the begining of the file. The program will pass the value of the mp_mass(""

to your variable mass_weight. At this moment, the value of mp_mass is 0, because no mass calculation were done. When the program find s the following statements:
MASSPROP
PART CUBE.PRT
END MASSPROP
will perform a mass calculation, and the mp_mass(""

will hold the good value. But it cannot pass the value to your variable part_weigth until you regenerate once again the part.
Only after a second regeneration of the part your variable part_weght will keep the good value.
Now, if you change one dimension of the cube and you evaluate the "part_weight" the system will return the same value for mass. Regenerate once again and you'll have the right value.
Personal, I'm not considering this a bug. Somehow, it is logic. But this not means that PTC must let the things like this.
For the second method, if the analysis feature is the last feature, if you evaluate the following expression: mass:fid_analysis1, the result is correct.
But... If you want to pass the value to your variable, let's call it part_mass2, then you must write the following relation: part_mass2=mass:fid_analysis1. And you'll have the same problem like in the first case. You'll need a second regenaration to update the parameter part_mass2.
What to do? In part mode you can force the sistem to make a mass calculation and to print the results, or simply evaluate mass:fid_analysis1.
For drawings, instead of writing the note &part_mass2, you must write &mass:fid_analysis1, you will have the good result only with one regeneration.
Using this method you don't need to modify in any way PRO/PROGRAM, because the system will calculate the mass every time regenerates the analysis1 feature.
Hope I was able to clarify you.
-Hora.