Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Mar 17, 2015
Messages
46
Location
FR
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
 
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

Back
Top