Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
DimitrisBalgis
163 Views, 1 Reply

VBA

Hellow everyone.

 

I need an advice on VBA.I want to create an assembly containning two non standard profile beams placed face to face.

How can I find the center of gravity axis for the two in order to allign them into the assembly?Is it possible or should I find an other way to try to allign them?

 

1 REPLY 1
Message 2 of 2

Hello DimitrisBalgis

 

To get the COG of component, you can do it like this (inspire by a piece of code from Bob Van der Donk) :

Scan you assembly to get the parts, set ocompocc as component occurence  

 

Set odoc = oCompOcc.Definition.Document

Dim ocenterofmass As Point

If odoc.DocumentType = kPartDocumentObject Then

Set ocenterofmass = oCompOcc.MassProperties.CenterOfMass

 

 

Pierre Masson Product Support Specialist PS MFG EMEA Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report