I have been able to add the Center of Gravity to a Selected IDW Drawing view with the following VBA code:
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSelectedView As DrawingView
Set oSelectedView = oDoc.SelectSet.Item(1)
Dim oAddCofG As Object
Set oAddCofG = oDoc.ActiveSheet.Centermarks.AddByCenterOfGravity(oSelectedView)
Now comes the tricky bit, does anyone know how to either hide or Remove the Center of Gravity with VBA code?
You can manually turn it off, but I cannot see a logical method to turn it off in VBA.
Does anyone know how we can turn off the Center of Gravity off from a sinlge Macro click?
i haven't tried that but i will give it a bit of a go in the next day or two.
in the meantime maybe shoot over & post to the customisation area...
http://forums.autodesk.com/t5/Inventor-Customization/bd-p/120
or run the SDK utility that allows commands to be traced and see if you can reverse engineer from the user accessable commands?
( look in C:\Users\Public\Documents\Autodesk\Inventor 2014\SDK\DeveloperTools\Tools\EventWatcher ) or whatever version you have...
I see the code to add the centre mark but I don't see anything to remove it once placed.
I don't think it is possible.
Jon.