Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

journal file to display sheet 1

Status
Not open for further replies.

eroe

Mechanical
Jul 29, 2009
37
0
0
US
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
 
Replies continue below

Recommended for you

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:
[COLOR=blue]Option[/color] [COLOR=blue]Strict[/color] [COLOR=blue]Off[/color]  
[COLOR=blue]Imports[/color] System  
[COLOR=blue]Imports[/color] NXOpen  
[COLOR=blue]Imports[/color] NXOpen.UF  

[COLOR=blue]Module[/color] Module1  

    [COLOR=blue]Sub[/color] Main()  

        [COLOR=blue]Dim[/color] theSession [COLOR=blue]As[/color] Session [COLOR=blue]=[/color] Session.GetSession()  
        [COLOR=blue]Dim[/color] ufs [COLOR=blue]As[/color] UFSession [COLOR=blue]=[/color] UFSession.GetUFSession()  

 [COLOR=green]'in drafting, turn off the drawing sheet display (3d modeling view in drafting)[/color]
 [COLOR=green]'1 = modeling view (drawing sheet display off)[/color]
 [COLOR=green]'2 = drawing view (drawing sheet display on)[/color]
        ufs.Draw.SetDisplayState(2)  

    End [COLOR=blue]Sub[/color]  

    [COLOR=blue]Public[/color] [COLOR=blue]Function[/color] GetUnloadOption(ByVal dummy [COLOR=blue]As[/color] [COLOR=blue]String[/color]) [COLOR=blue]As[/color] [COLOR=blue]Integer[/color]  

 [COLOR=green]'Unloads the image when the NX session terminates[/color]
        GetUnloadOption [COLOR=blue]=[/color] NXOpen.Session.LibraryUnloadOption.AtTermination  

    End [COLOR=blue]Function[/color]  

End [COLOR=blue]Module[/color]


 
Thanks for the help cowski, I will play around with this later today!

Eric Roe
Electro-Mechanical Engineer
Airfloat LLC
 
Worked perfectly! Thanks for the help. I am wondering however, where is a good place to look up NXOpen and NXOpen.UF commands? I have tried the help browser, but I find it difficult to find a certain command that I am looking for.

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
 
Status
Not open for further replies.
Back
Top