Showing results for 
Search instead for 
Did you mean: 

%ui_comp_selection class: geometrical properties not updating




I’m using the %ui_comp_selection class within my Knowledge Fusion code to allow users to select a solid body to extract various mass properties (eg . moments of inertia) and automatically populate those values into expressions. The code seems to be working as expected when the user selects a solid body that has been created from a standard “Design Feature”  function within NX (a block, cylinder, cone, or sphere).  In this instance the mass property expressions that were generated will automatically update after the user changes the parameters of the feature.  Unfortunately, this isn’t the case when the user selects a solid body that originates from, for example, an extrusion of a sketch.  In this case, the value of the expressions stay fixed at the original measured values (even when the dimensions of the sketch change).  I’ve also noticed that the measured values will go to zero when working with more complex solids that have been trimmed to contoured surfaces.  Can someone provide any insight as to what I might be doing wrong?  I’ve included some of the code I wrote for the solid body selection below.







(child) uiSelectBodies: {

 class, %ui_comp_selection;

  label, "Select Bodies";  # Title to appear on dialog

  toolTip, "Select Bodies";             # Text to display when mouse hovers over item

  many, true;                                      # multi select

  scope, 1;                                            # Control selection scope for reference objects

  filterTriple, {{70, 0, 0}};





(method any) saveGeometrySmiley Sad) @{


        storevalue(uiSelectBodiesSmiley FrustratedelectedObjects:, nth(1, ExpressionsSmiley Happy, selectedBodies); # store selected bodies