ug_setExpressionValue not updating expressions
ug_setExpressionValue not updating expressions
(OP)
I am writing a knowledge fusion dfa for controlling the expressions within the current workpart. I am using ug_setExpressionValue to set the value of the expression. I am working joining in the Knowledge Fusion ICE IDE and having NX open with it connected to this dfa file. By changing the values inside of the dfa file and saving the file does not cause the expressions to update. I have to right click on the attribute inside the knowledge fusion tree to get the value to cache.
Any ideas what could be wrong?
I've tried putting a ug_KFUpdate as the last line of the dfa file and still the expressions are not updating themselves.
Any ideas what could be wrong?
I've tried putting a ug_KFUpdate as the last line of the dfa file and still the expressions are not updating themselves.





RE: ug_setExpressionValue not updating expressions
Tools -> Update -> Update for External Change
Note that this is one of the reasons why, starting with NX 8.0, that we replaced the use of KF routines for linking Expressions and Attributes with a set of explicit functions available from the Expression and Attribute dialogs. That way they could be fully integrated into the normal NX update mechanism and no longer required any external trigger.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: ug_setExpressionValue not updating expressions
Thank you for responsing. Yeah...you are right. Knowledge Fusion just like the language it was derived from Scott Heide's AutoCAD Intent! language is a demand drive language. However, the trick here is to force those attributes to be evaluated by using demandValue inside of a child rule. So, the trick is this:
(number parameter) abc: 25 ;
(String modifiable) cWorkPart: ug_askCurrentWorkPart();
(Any Modifiable) AskMyExpAbc: ug_askExpressionValue_(cWorkPart:, "abc");
(Any Modifiable) SetMyExpAbc: ug_setExpressionValue_(cWorkPart:, "abc", format("%8.3f",DS:));
(child) do_it:
{
class ; ug_point ;
suppress?, true ;
demandValue, {AskMyExpAbc: , SetMyExpAbc:} ;
} ;
Back in the mid 90's I use to do write automation code using AutoCAD Intent! when there was no IDE and we were writing code object oriented code in notepad. Then compiling it and fixing it and on and on until we built an entire application. Knowledge Fusion is still a specialized lanugage and even the ICE IDE is not that great. The error message is still not improved in the last 20 years. It is still the same and no intellisense.
Just curious if you know if Siemens is planning of developing more technology into Knowledge Fusion?? Improving the ICE IDE? Improving performance?? It's come along alot since the original intergration back in UG V17. Now, there is associative between the knowledge fusion objects and the ug objects.
Regards.