×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Controlling precision of Mass Property
3

Controlling precision of Mass Property

Controlling precision of Mass Property

(OP)
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).

RE: Controlling precision of Mass Property

2
"...without any API please..."

Looks like you're SOL.

-handleman, CSWP (The new, easy test)

RE: Controlling precision of Mass Property

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.  

RE: Controlling precision of Mass Property

It is definitely in the part/assembly file.

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

-Dustin
Professional Engineer
Pretty good with SolidWorks

RE: Controlling precision of Mass Property

(OP)
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!

RE: Controlling precision of Mass Property

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)

RE: Controlling precision of Mass Property

(OP)
Nah, something this basic shouldn't require API.

RE: Controlling precision of Mass Property

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.

RE: Controlling precision of Mass Property

(OP)
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!

RE: Controlling precision of Mass Property

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)

RE: Controlling precision of Mass Property

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

RE: Controlling precision of Mass Property

(OP)
handleman, I guess we have a different definition of what API is winky smile

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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources