If this is only happening with one assembly, I would suspect that there is a problem with the file (or one of more of the component parts) itself rather than with the code which is adding the Mass Property (Measurement) Expressions to the assembly model.
I talked to our developer responsible for this code and he states that you should not be surprised that it actually takes a bit longer to create the Measurement Expressions, after you hit the OK button, than it took to perform the initial mass property calculation when you first started to select objects. The reason for that is because, despite what might be logical, we first RERUN the calculations before saving the results (I know, this seems like a waste of time because we already displayed the results temporarily and technically they should still be good 2 seconds later when you hit OK, but that is just the way the code works, however this is a very small part of the time it takes to complete the task so it's not really a problem).
The extra time that it DOES take has mostly to do with the fact that we need to create what we call an 'object record' in the Assembly file which the Measurement Expressions are actually assigned to since for them to be associative and automatically update if changes are made, they have to be part of a smart object or feature (even if you can't see or 'touch' this feature, it still needs to be created).
Note that we don't create this feature when the initial calculation is done for a couple of reasons. A) you might change your mind and add or remove selected objects and since we don't wait for you to do anything before displaying an initial result, we wanted to keep this working as fast as possible. B), you may decided to NOT save the results permanently (you've toggled OFF the 'Associate' option) so why waste any time, after displaying the temporary results, creating a feature record which we are just going to have to throw away anyway. Therefore, we wait until you hit OK and then check to see if the Associate option was toggled ON and if it was, we then recompute the information, create the Object Record, assign the Measurement Expressions to it. add them to the list of Expressions in the Assembly file, thus finishing the task. Now because we are actually creating something permanent, we have to do some additional checking to make sure that we have all of the data needed to complete the task (which might require some additional time if for example the components had only been partially loaded or there were some Interpart links that needed to be checked) so it does take some additional time, above and beyond the actual mass property calculations, which as you already seen, is very fast indeed.
Now what is the typical time you should expect?
I did some testing with a couple of average sized assemblies. I had a couple in the 150 component range and for both of them, with the worst case scenario, it took about 2 seconds (these tests were done on my 3 year old Dell M65 laptop) for the initial computation of the mass properties and about 15 seconds, after I hit OK, to actually process and save the results as Measurement Expressions in the Assembly. I then tested this using an assembly with about 370 components, where it took perhaps 3 seconds to compute the data and 27 seconds to actually save it and complete the operation.
So, if your assembly only had 67 components and it's taking you 20 minutes to complete the task, I suspect that we have problems somewhere else.
As to what you can do, try doing a Part Cleanup on all of the components and re-save them and see if that helps. If it does not, then you may need to send this assembly file to GTAC so that our developers can look at it as this should NOT be taking this long no matter how complex your parts may be, something else is slowing this process down, but we would have to see the parts to determine what the real cause is as I suspect that what you're seeing is only the symptom of something that may not be related to Mass Property Calculation at all.
Anyway, I hope this helps.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
To an Engineer, the glass is twice as big as it needs to be.