Their is a macro that place a 3D point at the Cg faq559-356 and you can rerun this when the model changes. Here is the macro rewritten for 2005
'*********************************************************************
'This macro creates a 3D-sketch point. It also names the 3D-sketch Center of Gravity (COG),
'date (dd.mm.yyyy), and time (hh:mm:ss).
'
'This macro works in SWx 2005
'*********************************************************************
Dim swApp As Object
Dim ModelDoc As Object
Dim Point As Object
Dim Sketch As Object
Dim status As Long
Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set ModelDoc = swApp.ActiveDoc
MassProp = ModelDoc.GetMassProperties2(status)
ModelDoc.Insert3DSketch2 (True)
Set Sketch = ModelDoc.GetActiveSketch2
ModelDoc.SetAddToDB (True)
Set Point = ModelDoc.CreatePoint2(MassProp(0), MassProp(1), MassProp(2))
ModelDoc.SetAddToDB (False)
ModelDoc.Insert3DSketch2 (True)
Sketch.Name = "COG " & Format$(Now, "dd.mm.yyyy hh:mm:ss")
ModelDoc.EditRebuild
Set swApp = Application.SldWorks
End Sub
Best Regards,
Heckler
Sr. Mechanical Engineer
SW2005 SP 4.0 & Pro/E 2001
Dell Precision 370
P4 3.6 GHz, 1GB RAM
XP Pro SP2.0
NIVIDA Quadro FX 1400
o
_`\(,_
(_)/ (_)
"There is no trouble so great or grave that cannot be much diminished by a nice cup of tea" Bernard-Paul Heroux