Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Extract Sub-Components from Part Body

Status
Not open for further replies.

das583

Aerospace
May 5, 2016
4
US
I need to be able to extract the sub-components of a partbody. I can do this in the "Measure Inertia" tool but need to replicate the information extract in a catia macro, preferably catvba script and export it to a text file. I have been able to extract the parameters of the part such as partnumber, name, definition, mass, etc but have not been able to extract the sub-components. So for example:

PartABC-A.1
PartBody​
MachinedBody​
ReferenceBody​

So I would want it to extract it like:
PartABC-A.1
Partbody
MachineBody
ReferenceBody

Anyone have any ideas?

Thanks
 
Replies continue below

Recommended for you

To iterate through bodies in Part, use Bodies() collection.
Not tested yet, but you can try something like this:

Code:
Set partRoot = partDoc.Part
Set bodiesColl = partRoot.Bodies

For a = 1 To bodiesColl.Count
[indent]Debug.Print bodiesColl(a).Name[/indent]
Next


Tesak
- Curved text for Catia V5
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top