I cloned an imported stp file into a new job number using the rename name type. I now have all my assembly tree looking like I want it, but the name of each part, by looking at properties or on the quick pick menu are still the old name from before the clone, any ideas on this one?? Thanks
Solved! Go to Solution.
try this journal :
Option Strict Off Imports System Imports NXOpen Imports NXOpen.Assemblies Module rename_all_components_to_use_descriptive_part_name Dim theSession As Session = Session.GetSession() Sub Main() Dim dp As Part = theSession.Parts.Display Dim c As Component = dp.ComponentAssembly.RootComponent ProcessAssemblyTree(c) End Sub Sub ProcessAssemblyTree(ByVal c As Component) Dim children As Component() = c.GetChildren() For Each child As Component In children child.SetName(child.DisplayName) ProcessAssemblyTree(child) Next End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer Return Session.LibraryUnloadOption.Immediately End Function End Module