Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Controlling precision of Mass Property 3

Status
Not open for further replies.

daofdesign

Mechanical
Aug 26, 2010
12
0
0
CA
I browsed over here and couldn't find anything related.

In a drawing, I'm extracting a custom property from the part level, "MASS", which is derived for the SW file property.

Is there a way to control the Mass units' precision? I looked in Document Property (both the part and the drawing) and I can't access the unit precision there. I don't really mind it at the part level, but I need to control it in the drawing and the BOM.

Nothing looks more stupid than a 3-ton welded assembly showing its mass with 5 digits precision! I'd like to round it off to at least no digits, without any API please.

That was so easy to do in Solid Edge (just adding "@2" after the custom property callout would adjust the text to 2 digits after zero).
 
Replies continue below

Recommended for you

You may try opening the 'mass properties' window and clicking 'options' where you will see a spot to user define the settings and decimal places.
 
It is definitely in the part/assembly file.

Tools, options, document properties, units, mass/section properties, length.

-Dustin
Professional Engineer
Pretty good with SolidWorks
 
Can someone post a screenshot showing the exact location where they are controlling the Mass precision? There is something I think I'm missing...

In the Evaluate -­> Mass Properties -> Options : I can only control the length precision. There are no dropbox next to the mass.

In the Tools -> Options -> Document Properties -> Units : There are no precision control next to the Mass, even in "Custom" units mode.

SW2011 64 bits on Win7.

Thanks!
 
So, are you willing to relax your "without any API please" requirement yet? You can do this with a tiny bit of VBA code in an equation...

-handleman, CSWP (The new, easy test)
 
Per ShaggyPE's suggestion;

In the part model (not the drawing) go to Tools > Options > Document Properties > Units > Mass/Section Properties > Length and select the desired number of decimal places in the Length field. It may not look or seem logical (because it isn't) but it will affect the Mass property.
 
OK, I guess I'm stuck with putting 4 digits to work on the model, then revert to 0 digit when I exit the model so the drawing displays a round-off value for the mass. Or go with API...

Thanks for the support!
 
So you would discount the method that is just as easy, more targeted (affects only the mass and none of the other mass properties), and more flexible, just because you don't like it?

The equation:

RoundedMass = Round("SW-Mass", 0)

will result in the mass rounded to 0 decimal places.

Only want it to the nearest 5g?

RoundedMass5g = Round("SW-Mass"/5, 0)*5

The global variables created by this equation are just as easy to link to in a drawing as the default mass is.

-handleman, CSWP (The new, easy test)
 
handleman,

So that would leave the SW-Mass of the part set to default, because the "Mass" note in the drawing would link to the RoundedMass property.

That's too easy. You're spoiling all the fun. [smile]
 
handleman, I guess we have a different definition of what API is ;-)

I can live with a couple of formulas to define a custom property. Your method is what I will use. I call this basic parametric design.

API, to me, is knowing C++ or VB and coding an app to get what I need. THAT was out of question.

In the end, I'll be able to do what I want, so thanks!
 
Status
Not open for further replies.
Back
Top