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!

How to find the parent of the linked_face in VB ?

Status
Not open for further replies.

PSI-CAD

Computer
Joined
Feb 13, 2009
Messages
997
Location
FR
Hi,

Withe the following lines, I am able to find all "LINKED_FACE' in part

For Each primitive As Features.Feature In maquette.Features
If primitive.FeatureType.ToString = "LINKED_FACE" Then
echo(primitive.FeatureType)
End If
Next

Now, I would like to find the parent of the linked_face

Thanks in advance

Regards
Didier

Regards
Didier Psaltopoulos
 
UF.Wave.AskLinkSource will give you the source entity given a wave link feature. The lines of code below are from an old journal I have; if all goes well, it will give you the tag of the source entity and the name of the part that owns it.

Code:
Dim theSourceEntityTag As NXOpen.Tag = NXOpen.Tag.Null
Dim owningSourcePartTag As Tag = NXOpen.Tag.Null
Dim allowLoad As Boolean = True
Dim owningPartName As String = ""

Try
    '.AskLinkSource throws error if link is internal to the part being processed
    '(simple hole, mirror geometry)
    theUfSession.Wave.AskLinkSource(theFeature.Tag, allowLoad, theSourceEntityTag)
    theUfSession.Obj.AskOwningPart(theSourceEntityTag, owningSourcePartTag)
    theUfSession.Part.AskPartName(owningSourcePartTag, owningPartName)

www.nxjournaling.com
 
Hi Cowski

Forget my previous post, I succeed with your explanation, thanks a lot


Regards
Didier Psaltopoulos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top