Inventor General

Reply
Contributor
DimitrisBalgis
Posts: 15
Registered: ‎01-19-2012
Message 1 of 2 (76 Views)

VBA

76 Views, 1 Replies
04-21-2012 03:30 AM

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?

 

Product Support
pierre.masson
Posts: 227
Registered: ‎05-27-2010
Message 2 of 2 (45 Views)

Re: VBA

04-24-2012 12:20 AM in reply to: DimitrisBalgis

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube