Hi,
I have developed a journal by which desired reference set (Let's say "ASSY") can be created. But i am unable to move the components into this reference set using a journal.
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Start")
theSession.SetUndoMarkName(markId1, "Reference Sets Dialog")
Dim markId2 As Session.UndoMarkId
markId2 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Create New Reference Set")
Dim referenceSet1 As ReferenceSet
referenceSet1 = workPart.CreateReferenceSet()
Dim markId3 As Session.UndoMarkId
markId3 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Add Components to Reference Set")
Dim nErrs1 As Integer
nErrs1 = theSession.UpdateManager.DoUpdate(markId2)
theSession.DeleteUndoMarksUpToMark(markId3, Nothing, False)
Dim markId4 As Session.UndoMarkId
markId4 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Edit Name of Reference Set")
referenceSet1.SetName("ASSY")
Dim nErrs2 As Integer
nErrs2 = theSession.UpdateManager.DoUpdate(markId4)
theSession.SetUndoMarkName(markId1, "Reference Sets")
theSession.DeleteUndoMark(markId1, Nothing)
End Sub
End Module
___________________________________________________________________________________________
Can u please help me in this issue.
Thanks in Advance
Regards,
Praveen