Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Dec 8, 2002
Messages
13
Location
CA
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
 
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

Back
Top