how to get geometric center of a part in solidworks

hi,i want to get geometric center of a part in solidworks, how to do it?

is there a api ot a macro that can do it ? 

thank you !

SolidworksApi macros
Answers 12
SF
SF 2010-08-07 Best Answer

here you go

but sometimes you may have a reference coordinate system so you need to chose it as in the second pic

SF
SF 2010-08-07

thank you ,Ahmad Ayesh.

it is a good way to get geometric center of a part in solidworks,but is there any good api or macro to do it?

SF
SF 2010-08-07

in solidworks i don't know if there is any other way to do this >>> and i don't know any other program to do this >>> if your looking for accurate; solidworks is the best

best regards

Ahmad Ayesh

DB
DB 2010-08-07

Here is a macro that creates a sketch point at the center of mass of the part.  The point does not update if you change geometry, the macro needs to be run again in that case.  The macro is called Center of Gravity.

http://sw.fcsuper.com/index.php?name=UpDownload&req=viewsdownload&sid=5

Also, there is a difference between center of mass and geometric center.  They are in the same location if the material is a constant density, but if density is not constant, they are in different places.

SF
SF 2010-08-07

Dustin: thank you very much for helping

SF
SF 2010-08-07

Dustin : can you help me please ?

the link you've just posted is amazing

actually it's the first time i see this supported files;

i've just seen the "make 8 reference views" how can i active it on solidworks so i can make 8 views

thank you

SF
SF 2010-08-08

Dustin: the macro in the website you provided works very well, thank you for your help!

DB
DB 2010-08-08

Glad to hear it.  There are lots of great places out there to find SolidWorks macros.  Here are a few of my favorites:

http://sw.fcsuper.com/

http://www.lennyworks.com/solidworks/

http://www.angelsix.com/cms/downloads/solidworks-macros

A google search for solidworks maro will yield a fair amount of results as well.

enjoy.

DB
DB 2010-08-08

Typically donloading the macro and saving it to some known location (I have created a folder that contains a lot of macros).  Then from within SolidWorks, go to tools>macro>run and browse for the specific macro.  If it produces an error, then getting it to work will be a little more labor intensive.  At that point shooting an email to the macro creator might be necessary.  Posts on this forum can usually find the issue as well.

SF
SF 2010-08-08

Dustin ..... thank you very much

SF
SF 2010-08-09

Deepak Gupta..... thank you very much!

those websites are very good, it help me a lot. thank you!