Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Body name from selection

Status
Not open for further replies.

otx12

Automotive
Dec 8, 2002
13
I have a real question for the CAA programers out there.
I have a selection from wich I return the selected element. I cannot find a way of returning the name of the body that aggregates the selection. I can get into the Brep and hack out the name of the object that was selected, but no way of getting the the Body (Hybrid Body).

Any help would be really apreicated

Matthew Lacroix
 
Replies continue below

Recommended for you

in another forum i wrote :

Sub CATMain()

Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument

Dim part1 As Part
Set part1 = partDocument1.Part

Dim oSel As Selection
Set oSel = partDocument1.Selection

Dim oObject As AnyObject
Set oObject = oSel.Item(1)

Dim tOPENBODY As String

tOPENBODY = oObject.Value.Parent.Parent.Name

MsgBox oObject.Value.Name & " is in " & tOPENBODY

End Sub

its VBA but it might help ;)

Eric N.

catiav5@softhome.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor