Autodesk Inventor
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
VBA
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
66 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?
Re: VBA
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.

