As many of us know the center of gravity can be found easily in SOLIDWORKS by going to Tools, Mass Properties. It shows a lovely pinkish purple triad in the place of the center of gravity. But shock when closing mass properties it goes away. But it's something that from time to time we need to stay visible.
I have found a macro that does locates a 3D Sketch point on the center but it is a one shot deal, move the mass around and the point is useless. But, there is another way.
There are SOLIDWORKS variables in the equations pull down to use for center of gravity x,y,z. We just need to tie those to the point.
I have found a way to do this:
Use tools, equations to build three variables, type X=
then go to the bottom lower right hand corner and expand the drop down.
pick "SW-CenterofMassX" resulting equation should read X="SW-CenterofMassX"
Click ok, Repeat for y and z
insert a 3D sketch
create a point in the sketch
make sure the point is not on either the x y or z plane from the origin
dimension to the sketch point, use the tab key to convert the dimension from a point to point direct dimension to either an x, y, or z orthogonal dimension
right click dimension and use "Link Value" to attach it to the appropriate variable.
Notes on this use:
Make sure the model is mated so that there can't be any negative values for x,y,z positions of the center or mass. The mass will update a negative value but the SOLIDWORKS dimension tool will convert it to a positive value, so it may end up with an improper location if the part/assembly is not in the positive half of the planes. For parts that you don't want to move off of the origin (for good reason), place the part into a new assembly file and place it in the positive area of x,y, and z.
John Van Engen
CATI Tech Support