Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS 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
Feb 13, 2009
997
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
 
Replies continue below

Recommended for you

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor