journal file to display sheet
journal file to display sheet
Hello,
I am trying to set up a journal file that will automatically save a part in the way that my company would like us to save every part (that way I do not have to do 5 or 6 repetitive tasks every time I am done modifying a part). I need to
save the part in an Isometric View, Wire Frame, and in the Modeling application. I also have to make sure that in drafting, the sheet is displayed (I do not see how this makes a difference, but I do not make the rules..).
I already have a journal file that can save the part in an isometric view, wire frame, and in modeling (I have to be in Modeling to run the journal in order for it to do this)
But does anyone know how to turn the sheet to display in drafting through a journal?
Do you have to be in the drafting application to do this? If so, does any one know how to switch between applications through a journal?
I have tried searching these, but have not had any luck getting answers.
As of right now I have to manually go into drafting and ensure that the sheet is displayed, then manually go back into modeling to run the journal that saves the part correctly.
Any help would be great!!
Eric Roe
Electro-Mechanical Engineer
Airfloat LLC





RE: journal file to display sheet
I ran across the function you need just this past week. In my somewhat limited testing, you can run it from the modeling or drafting application and if the sheet is already displayed it will return no error (i.e. it just works).
CODE
Imports System
Imports NXOpen
Imports NXOpen.UF
Module Module1
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
'in drafting, turn off the drawing sheet display (3d modeling view in drafting)
'1 = modeling view (drawing sheet display off)
'2 = drawing view (drawing sheet display on)
ufs.Draw.SetDisplayState(2)
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image when the NX session terminates
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
End Function
End Module
www.nxjournaling.com
RE: journal file to display sheet
Thanks for the help cowski, I will play around with this later today!
Eric Roe
Electro-Mechanical Engineer
Airfloat LLC
RE: journal file to display sheet
Just wondering because I always come up with ideas for using a journal (like the one in this post), and I know there is a command out there to do what I want, but I just can not find out what it is. I wish there was a list (or some kind of database) that tells you the command, and explains how it by giving examples or something.
If the help file is what many people use, whats a good way to find what your looking for?
Eric Roe
Electro-Mechanical Engineer
Airfloat LLC