Center of gravity (center of mass)

Is there a way to show the center of gravity as a point froma part or assembly?
Thx, ChrisSolidworksGeneral
Comments 7
PY
PY 2008-04-03
Here's a macro that will do it...

Keep in mind - its static. It will only work for that point in timethat you executed the macro, ie it won't update with the model asyou update it...
SF
SF 2010-12-06

Hello Pete

I already have the macro to show the point, but it only appears when I click on Mass Properties Icon.

If there a way to keep visible the center of gravity point on the part or assembly?

Thanks in advance

E. Viola

SM
SM 2010-12-06

Chris,

See if this thread helps you.

https://forum.solidworks.com/message/23514#23514

SF
SF 2010-12-06

Try this one.  It is a macro that you run that puts a sketch at the CG that will update as the model changes.

  WT

SF
SF 2010-12-06

Hello Wayne,

Thanks for your help, however the macro doesn't work. I have SW 2010 CAD Premium and Simulation Professional (64 bits).

"runtime error"

Regards

SF
SF 2010-12-06

Try starting SW and then in the Macro toolbar, click the icon to Edit Macro.  Point to the CG macro and open it.  Then go to the Tools menu of the VB editor and select References - most likely you will have three that are showing as missing.  Go down the list and instead check the box for the appropriate SW2010 versions, save the macro, and try again.

  WT

SF
SF 2010-12-07

Center of mass coordinates are available for use in equations using the format "SW-CenterofMassX | Y | Z"

You could define global variables based on these values, and then use Link Values to drive dimensions to place a point. Save the Part as a part template and you'll always have a point in your part where the CG is.

Edit: trying to set this up in reality may take some working around to cover all cases, since SW doesn't like 0 length geometry.