Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

catia : use VBA to create an InertiaVolume in the part, not just get the results.

Status
Not open for further replies.

jissididi

Automotive
Mar 17, 2015
46
ScreenHunter_3_wqjrro.jpg


Hi,
I am looking for a way to create an InertiaVolume in catia (see picture) using VBA.
Do you have any idea ?
I need it to be created in the part, I can't afford to just get the measure results.
Thanks
 
Replies continue below

Recommended for you

Hi

' Find the workbench
Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )

' Create the inertia for a product
Dim ProductInertia As Inertia
Set ProductInertia = TheSPAWorkbench.Inertias.Add(Product)

' Get some inertia data
Dim Mass As Double
Mass = ProductInertia.Mass
Dim Coordinates(2)
ProductInertia.GetCOGPosition Coordinates
Dim Matrix(8)

Regards
Fernando

- Romania
- EU
 
OK THANKS A LOT
BUT...
IS THERE A WAY OF DISPLAYING THE INERTIAVOLUME AT THE SCREEN ?
 
YES THAT 'S WHAT i WANTED TO AVOID...
THANKS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor