Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

name field in properties 1

Status
Not open for further replies.

Lars1978

Mechanical
Dec 30, 2015
327
Hi All,

Please see beneeth the assembly navigator with a file maked (greenish) and the properties of this file shown in the right. Iv got this file originaly as a .stp file. I see the name on the left (new name) differs from the name on the right. :(


Where can I find the attrute which shows the name out of the properties field.
I'd like to have this name always be the same in the assembly navigator and the name field at the properties.
Oh it seems in mij drawing the name out of the properties is used instead of the discriptive name in the assembly manager...

Any suggestions....

2019-02-06_10_25_23-Window_ovhdaa.png


Lars
NX native (NX13 or NX1847)
Solid Edge ST10
Inventor
Solidworks
 
Replies continue below

Recommended for you

The name in the properties field is the name (taken from the part) that the Component gets when it is First added to the assembly. It is also "in context of the assembly". You can change it in the properties without changing it for the part itself.
This will not automatically change anymore...Even when you substitute the component it will still stay the same.
So making it ALWAYS the same in the navigator will be hard to accomplish.



Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11
 
Ronald,
you can delete the component name( the x in the right menu above)then then it gets "reset".
I think i wrote an Enhancement request on that sometime during the 90-ies....

Regards,
Tomas

 
Toost said:
I think i wrote an Enhancement request on that sometime during the 90-ies....

I guess they couldn't get around to that just yet.....but we have new icons (again)! [2thumbsup]

Tim Flater
NX Designer
NX 11.0.2.7 MP11 Rev. A
GM GPDL 11-A.3.5
Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M
 
No, what i am saying is that it was impossible to get rid of component names , long time ago, and hopefully I helped remove that issue. :)

I still haven't seen the new icons, - i assume that it is the 1847 icons you think of.
I personally do not like the "flatter, whiter, appearance and less 3D" of later MS/ Windows ( Win 8 and later) Not to mention the "innovative user interfaces" that some apps have started with.
i guess that the new icons are "flatter", less colorful, and less intuitive...

Regards,
Tomas


 
Apologies for straying off-topic.

Thanks for taking the wind out of my sails, Tomas. J/K

As far as the new icons - for me, it's not really a matter of how they look. I just feel there's more important things to work on than the "theme" of the icons at this point in time. Too many current users and users coming from other softwares pointing out shortcomings for me to be convinced that icons should be a high priority to anyone right now. I'm not completely irate about it, just disappointed. To be perfectly honest, not surprised at all that this happened - par for the course.

You judge for yourself what you'd call the new icons. I haven't had the misfortune of using Win10 yet but it's coming soon from what I've been told. Someone definitely likes cyan and orange and grayscale (what I call the late 80s Apple Mac icons).

1847.png

Tim Flater
NX Designer
NX 11.0.2.7 MP11 Rev. A
GM GPDL 11-A.3.5
Win7 Enterprise x64 SP1
Intel Core i7 2.5GHz 16GB RAM
4GB NVIDIA Quadro K3100M
 
Toost said:
Ronald,
you can delete the component name( the x in the right menu above)then then it gets "reset".

That is what I said....needs manual interaction


Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX12 / TC11
 
If memory serves, someone posted a journal on the Siemens site a while back that would set the component name to be the same as the part file name. A quick search didn't yield the exact journal that I was thinking of, but here are a couple similar ones:

If you always want the component name to match that of the file name, a journal could be made to set the component name and this could be set to run on part open (or part save, or some other user exit).

www.nxjournaling.com
 
I misunderstood you there Ronald.

Tim, i do agree on this. I can name quite a few things i rather would spend development money on than new icons.
- I still haven't seen the light in the ribbon bar...

/ Tomas

 
So the only way to change the component name into the part namer aka file name is to write a journal?

Oh I'm with you all regarding the icons.... I rather like other developments... (my best hope i that the icons are not made by the development team (programmers) at siemens :) )



Lars
NX native (NX13 or NX1847)
Solid Edge ST10
Inventor
Solidworks
 
Lars1978 said:
So the only way to change the component name into the part namer aka file name is to write a journal?

No, you could delete the name (as mentioned above) or rename them manually. The journal would only be useful if you have a lot to rename at the same time.

www.nxjournaling.com
 
can I have a colum in the assembly navigator which shows this name?

I can't find it...



Lars
NX native (NX13 or NX1847)
Solid Edge ST10
Inventor
Solidworks
 
Ok thnx

Lars
NX native (NX13 or NX1847)
Solid Edge ST10
Inventor
Solidworks
 
Try this, it should help.

Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Assemblies
 
Module NXJournal
 
    Public theSession As Session = Session.GetSession()
    Public ufs As UFSession = UFSession.GetUFSession()
    Public lw As ListingWindow = theSession.ListingWindow
 
    Sub Main()
	
    Dim workPart As Part = theSession.Parts.Work
    Dim dispPart As Part = theSession.Parts.Display
 
    lw.Open
	
    Try
        Dim c As ComponentAssembly = dispPart.ComponentAssembly

	if not IsNothing(c.RootComponent) then

            ReportComponentChildren(c.RootComponent, 0)
			ReportComponentChildren2(c.RootComponent, 0)
			
        else

            lw.WriteLine("Part has no components.")

        end if
		
    Catch e As Exception
	
        theSession.ListingWindow.WriteLine("Failed: " & e.ToString)
		
    End Try
	
		lw.Close
 
    End Sub
 
'*****************************************************************************************
' Empty run
'*****************************************************************************************
Sub reportComponentChildren( ByVal comp As Component, ByVal indent As Integer)
	Dim workPart As Part = theSession.Parts.Work
    Dim dispPart As Part = theSession.Parts.Display

    For Each child As Component In comp.GetChildren()
	
	Dim MyPart As Part = child.Prototype.OwningPart

	Try

		if child.IsSuppressed = true then

			lw.writeline("   Error: " & child.DisplayName & ".prt" & " -> " & "File closed")
			Continue for
			
		end if
		
			Catch e1 As Exception
		        theSession.ListingWindow.WriteLine("Failed: " & e1.ToString)

	end try

        If LoadComponent(child) Then    		        

            Else

                'component could not be loaded

            End If

            reportComponentChildren(child, indent+1)
          
        Next

    End Sub
	
'*****************************************************************************************
' Changing file name 
'*****************************************************************************************

Sub reportComponentChildren2( ByVal comp As Component, ByVal indent As Integer)

	Dim workPart As Part = theSession.Parts.Work
   	Dim dispPart As Part = theSession.Parts.Display
	
	For Each child As Component In comp.GetChildren()

	Dim MyPart As Part = child.Prototype.OwningPart 

	Try

		if child.IsSuppressed = true then

			lw.writeline("Error: " & child.DisplayName & ".prt" & "   " & "File closed")
			exit sub
			
		end if
		
			Catch e1 As Exception
			
		        theSession.ListingWindow.WriteLine("Failed: " & e1.ToString)

		end try



 	If LoadComponent(child) Then	
       
            Dim TextLength as Integer            
            Dim File_name as String
	    File_name = child.DisplayName()
	    TextLength = File_name.Length

 		'lw.writeline(File_name)		
		lw.writeline("component name: " & child.Name & "-> " & File_name )
		child.SetName(File_name)
		lw.writeline("new component name: " & child.Name)
		'lw.writeline("ref set name: " & child.referenceset)
		'lw.writeline("component part name: " & child.Prototype.OwningPart.fullpath)
		lw.writeline("")

	Else
	
		'component could not be loaded
				
	End If 	

            reportComponentChildren2(child, indent + 1)
			
        Next
		
    End Sub
	
'**********************************************************
' Function loading components
'**********************************************************

 Private Function LoadComponent(ByVal theComponent As Component) As Boolean
 
        Dim thePart As Part = theComponent.Prototype.OwningPart
 
        Dim partName As String = ""
        Dim refsetName As String = ""
        Dim instanceName As String = ""
        Dim origin(2) As Double
        Dim csysMatrix(8) As Double
        Dim transform(3, 3) As Double
 
        Try
            If thePart.IsFullyLoaded Then
                'component is fully loaded
				
            Else
			
                'component is partially loaded
				
            End If
			
            Return True
			
			Catch ex As NullReferenceException
            'component is not loaded
			
            Try
			
                ufs.Assem.AskComponentData(theComponent.Tag, partName, refsetName, instanceName, origin, csysMatrix, transform)
 
                Dim theLoadStatus As PartLoadStatus
                theSession.Parts.Open(partName, theLoadStatus)
 
                If theLoadStatus.NumberUnloadedParts > 0 Then
 
                    Dim allReadOnly As Boolean = True
                    For i As Integer = 0 To theLoadStatus.NumberUnloadedParts - 1
                        If theLoadStatus.GetStatus(i) = 641058 Then
                            'read-only warning, file loaded ok
                        Else
                            '641044: file not found
                            lw.WriteLine("File not found")
                            allReadOnly = False
                        End If

                    Next

                    If allReadOnly Then
                        Return True
                    Else
                        'warnings other than read-only...
                        Return False
                    End If
                Else
                    Return True
                End If
 
				Catch ex2 As NXException
			
				if ex2.message = "File not found" then 
				
	                lw.WriteLine("Error: " & partname & "   " & "File not found")		
					
				else
				
	                lw.WriteLine("Error: " & partname & "   " & ex2.Message)
					
				end if
				
                Return False
				
            End Try
			
        Catch ex As NXException
		
            'unexpected error
            lw.WriteLine("error: " & ex.Message)
            Return False
			
        End Try
 
    End Function

'**********************************************************
    Public Function GetUnloadOption(ByVal dummy As String) As Integer
        Return Session.LibraryUnloadOption.Immediately
    End Function
'**********************************************************
 
End Module

With best regards
Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor