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!

Display Parent tool

Status
Not open for further replies.

MyKL.S

Civil/Environmental
Nov 6, 2018
21
Hi,

I've just stumbled on this tool mady by CNSZU. Originaly posted on thread561-351100. Seems like a usefull thing for me unfortunatelly I can not load the library. I also found switch part tool which, in the 1.4 version, works great for me and basically could do the same job + more. But its rather slow to load whole assembly tree everytime if i would like to diplay just the parent part (which i hope is much faster to process).

Is there any chance you (CNSZU) could provide at least decompiled journal of the Display parent tool which might work or maybe then I could debug on which line the problem is.
Or if enyone else know better way to quickly diplay parent part.

Any help would be appreciated.
I'm using NX 9 with Win7
Thanks MyKL
 
Replies continue below

Recommended for you

You can always right click on part in assembly navigator, and choose from menu "display parent -> ". The parent will be on list.

With best regards
Michael
 
Yeah, that is the slow way I obviously know. But in most cases I have Part navigator displayed when modelling part, so I have to change to Assembly navigator and then RC->Display parent->select parent instead of this mentioned tool on hotkey and just one click. It might seems like a negligible difference but when you have to do it tens times a day it's quite bothering.

Anyway thank you for your post :)
MyKL
 
I don't think that @CNSZU will answer You, He logs last time in July 4, 2017. I looked in API documentation for "display parent" and there is no clear solution. I also tried to record some journal, but what was recorded Is not I wanna expect.
About load library, did You try to run it by this journal (from thread
Code:
Option Strict Off
Imports System
Imports NXOpen
Imports System.IO

Module NXJournal

    Sub Main(ByVal args() As String)

        Dim s As Session = Session.GetSession()
        Dim lw As ListingWindow = s.ListingWindow


'REPLACE THIS PATH WITH THE LOCATION OF THE DLL FILE:
'--------------------------------------------------------
	   Dim fullpath As String = "C:\NXSwitchPart.dll"
'--------------------------------------------------------


        If File.Exists(fullpath) Then

            Dim inObject() As Object = {}
            s.Execute(fullpath, "cNXSwitchPart", "Main", inObject)

        Else

            lw.Open()
            lw.WriteLine("Can't find " & fullpath)

        End If
      
    End Sub

End Module

With best regards
Michael
 
Yeah, I've noticed his last login. And I've also tried the journal you mentioned with no success. No error just nothing unfortunatelly.

Mykl
 
Thank you for your time. It's definitelly quicker in terms of loading and might be even faster if not loading all opened components. It's not showing every parent though, only the top level one.

MyKL
 
I have removed preview of model, so the code now works faster. Do You still want to display only a parent of open (work) file?

With best regards
Michael
 
Ideally all parents of work part, no need for diplaying other parts. Just like in the preview from CNSZU.
display_parent_sghcoz.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor