cancel
Showing results for 
Search instead for 
Did you mean: 

NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Pioneer
Pioneer

Hi all 

NX open stp assembly drawing assembly without thumbnails. What is the reason for this?8.30.jpg

10 REPLIES

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Siemens Phenom Siemens Phenom
Siemens Phenom

Thumbnails are only created when Part files have been saved from an interactive session.  The thumbnail is a 'capture' of the Part as it was being displayed when it was last saved.  When parts are imported, such as when being converted using STEP or IGES or any of the other exchange standards, if this is done as part of a non-interactive session, then there were no displays to 'capture' and thus no thumbnails.

John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Pioneer
Pioneer

hi JohnRBaker
creo and catia and sw do not have this problem. I think this can be improved.

8.30.png

thank you

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Siemens Phenom Siemens Phenom
Siemens Phenom

I agree.  I asked that this be enhanced years ago as the same problem occurs when you create part files using a Part Family master template.  The template has a thumbnail, but the 'children' created using the master template do not.  At a minimum, the 'children' could at least use a copy of the master template's thumbnail.  While that would not be perfect, it would be better than nothing, which is what we have today.

John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Pioneer
Pioneer

Hope in the NX12 can improve this function, this is a flaw, such as opening the customer sent the assembly file through the thumbnail management file will be no way to start. Do not know which one I want, this is a serious problem, I click on the time I do not know which name is the drawings I need, need to use more time to find the drawings I need, I would like to choose which one. I would like to ask NX12 to improve this. Will the red box which is the paper I need, I do not know which one I need but no thumbnails, how do I find the parts I need, this is a very serious problem.

9.31.jpg

2.After opening the display here is also blank.

831.jpg

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @FZK,

ER 1972409 was submitted requesting a solution to the blank previews.

Solution Center has a VB script that opens parts in a specified directory and saves them - which creates the previews.  Thus, having imported the step file into NX and saved the files, run the VB script to generate the previews and reopen the assembly.  I did notice that the program does not fit the display prior to creating the preview, but that's a simple edit that I had one of our script savvy engineers here change.  The edited version is below.  Copy the text, save it with a .vb extension and run the program (Menu > Tools > Journal > Play).

 

Option Strict Off

Imports NXOpen
Imports NXOpen.Preferences
Imports NXOpen.UI
Imports NXOpen.Utilities
Imports NXOpenUI
Imports System
Imports System.io
Imports System.Environment
Imports System.Windows.Forms

Module open_and_save_all_nx_parts_in_selected_directory_tree

    ' Choose the folder where to start, default is the Desktop
    ' Uncomment/modify for any other option
    Dim startfolder As String = ""
    ' Dim startfolder As String = "c:\"
    ' Dim startfolder As String = GetEnvironmentVariable("UGII_BASE_DIR")
    ' Dim startfolder As String = GetEnvironmentVariable("UGII_BASE_DIR") + "\Moldwizard"

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

    Sub Main()

        Dim foldername As String = startfolder

        lw.Open()
        If (select_directory(foldername) <> DialogResult.OK) Then
            lw.WriteLine("Input canceled...exit" & vbCrLf)
            Return
        Else
            lw.WriteLine("Selected directory " & foldername & vbCrLf)
        End If


        traverse_directory(foldername)

    End Sub

    Sub traverse_directory(ByVal foldername As String)

        Dim dir As DirectoryInfo = New DirectoryInfo(foldername)
        Dim fsi As FileSystemInfo

        For Each fsi In dir.GetFileSystemInfos()
            Try
                If (TypeOf fsi Is FileInfo) Then
                    Dim f As FileInfo = CType(fsi, FileInfo)
                    Dim pspec As String = f.FullName
                    Dim size As Long = f.Length

                    If (f.Extension.ToLower() = ".prt") Then
                        lw.WriteLine(vbCrLf & pspec & " " & size & "Bytes")
                        OpenAndSave(pspec)
                    End If
                Else If (TypeOf fsi Is DirectoryInfo) Then
                    traverse_directory(fsi.FullName)
                End If
            Catch
            End Try

        Next fsi

    End Sub

    Sub OpenAndSave(ByVal pspec As String)

        Dim basePart1 As BasePart
        Dim partLoadStatus1 As PartLoadStatus = Nothing
        Dim partSaveStatus1 As PartSaveStatus = Nothing

        s.Parts.LoadOptions.ComponentsToLoad = _
         LoadOptions.LoadComponents.None
        basePart1 = s.Parts.OpenBaseDisplay(pspec, partLoadStatus1)
        basePart1.Views.WorkView.Fit()


        If (partLoadStatus1.NumberUnloadedParts() = 0) Then
            partSaveStatus1 = basePart1.Save(BasePart.SaveComponents.False, _
                BasePart.CloseAfterSave.True)
                partSaveStatus1.Dispose()
        Else
            reportLoadStatus(partLoadStatus1)
            s.Parts.CloseAll(BasePart.CloseModified.CloseModified, Nothing)
        End If

        partLoadStatus1.Dispose()

    End Sub

    Public Function select_directory(ByRef foldername) _
                                 As System.Windows.Forms.DialogResult

        Dim fbd As FolderBrowserDialog
        Dim result As System.Windows.Forms.DialogResult

        fbd = New System.Windows.Forms.FolderBrowserDialog()
        fbd.Description = "Select directory to check"
        fbd.ShowNewFolderButton = False
        fbd.SelectedPath = foldername
        result = fbd.ShowDialog()
        foldername = fbd.SelectedPath
        fbd.Dispose()
        Return result

    End Function

   Public Function reportLoadStatus(ByVal loadStatus As PartLoadStatus) _
                                                               As Integer
      lw.Open()
      Dim counter As Integer = 0
      lw.WriteLine("Count of parts that failed to load: " & _
                    loadStatus.NumberUnloadedParts.ToString())
      lw.WriteLine("===========================================")

      Do
         Dim file As String = loadStatus.GetPartName(counter)
         Dim failure As String = loadStatus.GetStatusDescription(counter)
         Dim statusCode As Integer = loadStatus.GetStatus(counter)
         lw.WriteLine("File: " & file)
         lw.WriteLine("Code: " & statusCode)
         lw.WriteLine("Status: " & failure)
         lw.WriteLine(vbCrLf)
         counter += 1
      Loop Until counter = loadStatus.NumberUnloadedParts

      Return counter
   End Function

    Public Function GetUnloadOption(ByVal dummy As String) As Integer
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
    End Function

End Module

 

 

Regards, Ben

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Pioneer
Pioneer

hi BenBroad

Has been the perfect solution to the problem, look forward to the next patch to solve this serious problem rather than manually using VB script.

Look at the following figure, I went to view or edit the customer or the supplier sent over the non-NX product map, management and editing is very convenient.

So the thumbnail is very good, the next version or patch can optimize this place?
Thank you for your patience.
93.2 (1).jpg93.2 (2).jpg8.31.jpg

thank you.

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Pioneer
Pioneer

hi

met thumbnails showing the parts that I needed and opened after it was another part.
Through this script file can be repaired, but each time you need to fix some trouble, I hope the default is correct.

Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Esteemed Contributor
Esteemed Contributor

FZK -

Note posting on the Community site is NOT an official way to submit an enhancement to development.

You need to report this issue to GTAC (https://www.plm.automation.siemens.com/en_us/support/gtac/) (or your local VAR, depending on where you are and who sold you NX) and have an IR / ER submitted.

If you want others to vote on this, post the ER number here.

 

Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: NX open stp assembly drawing assembly without thumbnails. What is the reason for this?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @FZK,

 

As I mentioned earlier, this functional limitation was already documented in ER 1972409.  As @Ken_A mentioned, you can contact GTAC (either yourself or through your reseller) and request that you're added to the ER so that you get notified on any progress.  ER's will not go into the "next patch", they are usually introduced with major releases (NX11.0.1 was an exception) and can require major projects to implement.  NX12 projects have already been completed, so I wouldn't expect to see recently submitted enhancements until major versions beyond NX12.

 

Regards,  Ben