Journal to delete reference set
Journal to delete reference set
(OP)
Hi,
I've imported a step of a board and NX ha generated a reference set for each body imported 4200.
I want to delete all this reference set.
I don't know a OOTB command in NX, so a simple journal to clean those unwanted reference set.
Thank you,
I've imported a step of a board and NX ha generated a reference set for each body imported 4200.
I want to delete all this reference set.
I don't know a OOTB command in NX, so a simple journal to clean those unwanted reference set.
Thank you,
Thank you...
Using NX 8 and TC9.1





RE: Journal to delete reference set
I can't take credit for this ...
CODE --> (journal)
'This journal cycles through a part and deletes all reference sets ' 'It assumes that you have already loaded the part. Option Strict Off Imports System Imports System.Collections Imports System.Windows.Forms Imports NXOpen Imports NXOpen.UF Module Delete_All_RefSets_in_part Sub Main Dim s As Session = Session.GetSession() Dim ufs As UFSession = UFSession.GetUFSession() Dim part As Part = s.Parts.Work Dim refset As Tag = Tag.Null Dim list As ArrayList = New ArrayList ''Dim compList = New List(of NXOpen.Assemblies.Component)() Do ufs.Obj.CycleObjsInPart(part.Tag,UFConstants.UF_reference_set_type,refset) If refset <> Tag.Null Then Dim name As String ufs.Obj.AskName(refset, name) If name <> "Empty" Then list.Add(refset) End If End If Loop While refset <> Tag.Null For Each refset In list ufs.Obj.DeleteObject(refset) Next MessageBox.Show("Deleted " & list.Count & " reference sets") End Sub End ModuleHTH, Joe
RE: Journal to delete reference set
this journal works very well.
Deleted 4200 reference sets.
Thank you a lot.
Thank you...
Using NX 8 and TC9.1