Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Execution of NX journal.... nothing happens

Hello everyone,


As new Key user in my company I would like to implement some method to improve our work.

And for a first run I have try with a very simple action [activate/unactivate] update drawing option.


I have reccord NX journal in C# or .VB or c++.


And next I run this file.


But nothing happens NX tell me, it run properly without exception.

Option is still activate when arguement is False in journal file.


Is there any UGII option to set to allow modification by journal ?

or something else ?


Best regards


AMA_TRCK

NX90

6 REPLIES

Re: Execution of NX journal.... nothing happens

Hello Ama_trck,

 

The gui option you mention does not exist. If you run a journal, it will execute the code in it.

 

Can you post your code?

 

regards,

Frederik

Re: Execution of NX journal.... nothing happens

[ Edited ]

Hello frvanhee,

 

There is my code, very simple as I said.

 

 
' NX 9.0.3.4
' Journal created by ******* on Tue Nov 15 08:37:16 2016 Europe de l’Ouest
'
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String) 

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work

Dim displayPart As Part = theSession.Parts.Display

' ----------------------------------------------
'    Menu: Outils->Mettre à jour->Retarder la mise à jour de la vue
' ----------------------------------------------
workPart.Preferences.Drafting.DelayViewUpdate = False

' ----------------------------------------------
'    Menu: Outils->Journal->Arrêter l'enregistrement
' ----------------------------------------------

End Sub
End Module
This code is automatically generated by NX.
 
BR
 
AMA_TRCK

Re: Execution of NX journal.... nothing happens

Hello Ama_trck,

 

I had a look and indeed you can not see in the GUI. However, when I ask the setting before i change and after I change (see code below), I can see it changed internally.But this change is not reflected in the GUI after the journal runs.The question is now: is the internal setting correct, or is what the gui shows correct.

 

regards,

Frederik

 

' NX 10.0.3.5
' Journal created by frederik.vanhee on Mon Nov 21 10:52:47 2016 W. Europe Standard Time
'
Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String) 

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
        Dim theLW As ListingWindow = theSession.ListingWindow
        theLW.Open()
Dim workPart As NXOpen.Part = theSession.Parts.Work

Dim displayPart As NXOpen.Part = theSession.Parts.Display

' ----------------------------------------------
'   Menu: Tools->Update->Delay View Update
' ----------------------------------------------
theLW.WriteFullline("It was set to " & displayPart.Preferences.Drafting.DelayViewUpdate)
displayPart.Preferences.Drafting.DelayViewUpdate = true
theLW.WriteFullline("It is now set to "& displayPart.Preferences.Drafting.DelayViewUpdate)

' ----------------------------------------------
'   Menu: Tools->Journal->Stop Recording
' ----------------------------------------------

End Sub
End Module

 

Re: Execution of NX journal.... nothing happens

Hello Frederik,

 

I run some test on this, apparently, setting is correctly modified.

 

Apparently this is my GUI, who's not updated after a modification....

      When I change between modeling application et drafting application, GUI is updated....  And my view is updated or not. (correctly Smiley Wink )

 

When you try to switch between application, did you stay in drafting for example or, did you get back in modeling ?

 

Best regards

 

Adrien

 

 

 

 

 

Solution
Solution
Accepted by topic author AMA_TRCK
‎11-25-2016 05:42 AM

Re: Execution of NX journal.... nothing happens

Hello Adrien,

 

I did not try to switch.

What you can do is switch to modelling and back to drafting in your journal (after you change the setting the DelayViewUpdate) so the GUI reflects the setting correctly.

 

In any case, i think it would be good to log this with GTAC as a minor bug.

 

Regards,

Frederik

Re: Execution of NX journal.... nothing happens

by the way, I have the same GUI issue as you do (NX10)