cancel
Showing results for 
Search instead for 
Did you mean: 

KF expressions dont update when running journal from command line

Experimenter
Experimenter

I have a Knowledge Fusion application that creates a standard sets of expressions based on selected points.  These expressions function and update normally when NX is open. 

 

I have a journal file that assigns a value to a specified expression, updates the part, and then prints off all the expressions.  I can run this journal file both from the command line with NX closed and from inside of NX using the Run Journal functionality. 

 

I have found that when this journal file is run from inside of NX, the knowledge fusion expressions update normally.  When the identical journal is run from the command line, the knowledge fusion expressions do not update. 

 

How do I get my knowledge fusion variables to update properly when running a journal from the command line?  Does the DoUpdate() method behave differently with NX open or closed? Any help is appreciated.

3 REPLIES

Re: KF expressions dont update when running journal from command line

Esteemed Contributor
Esteemed Contributor

The UpdateManager.DoUpdate() function does work the same in both situations, but if the journal is run interactively, there is an update triggered after the journal has finished internally by NX.

 

You may need to commit the changes to the expression manager.

 

If you record the manual process, you should get a clue about which method is missing to trigger the update.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: KF expressions dont update when running journal from command line

Experimenter
Experimenter

I have solved this issue.  When the DoUpdate() method is called, the KF expressions update by running the DFA files that created and set them.  I did not have my KF .dfa files in the NX search path.  The files were working properly through the GUI because I had, at one point, added them to the KF applications list for that part and the assiciation remained.  This association was not loading in the the same way when the Journal feature was used from the command line. 

 

The fix was to place the KF .dfa file in the NX search path.  For me that was ...\NX8.5\UGII\dfa\. This made my part and journal behave as expected. Another fix that I think will work, but I have not yet tried, is to set the environment variable UGII_KF_USER_CLASS_DIR to the directory where my FK .dfa files are prior to running NX.

Re: KF expressions dont update when running journal from command line

Esteemed Contributor
Esteemed Contributor

Best is to use the UGII_KF_USER_CLASS_DIR variable and have the dfa files on a central server share.

To have the variable take effect, you also have to enable a customer default, if I remember correctly.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community