I am trying to design a tool that allows me to automatically modify dimensions of an archetypal CAD model using data obtained by an algorithm (therefore leaving geometric constraints untouched, but changing its size). The ultimate purpose is to use NX to extract data from the CAD model, launch the algorithm, change the CAD dimensions accordingly with the results of the algorithm, update the model, re-extract the data and iterate the whole process until desired.
Please correct me if I am wrong but i think that the best way to realize this is to use NX expressions (i also considered to modify a spreadsheet associated with the model, but i think it's more complicated).
How to build such a system? Is there an example in OPEN that deals with edit of expressions and model update? What functions should I look into?
Thanks again, sorry for trivial questions.
The easiest way to do this would be to use the "Sensitivity Study" tool built into NX. This is a technological cousin of the Optimization tool, but allows you to set up ranges and increment sizes for multiple expressions, and have NX update the model at each step -- extracting and tabulating desired expression values along the way.
Ribbon UI: Tools (tab) --> Utilities (group) --> More (button) --> Sensitivity Study
Older Menus: Analysis --> Optimization and Sensitivity --> Sensitivity Study
Where Optimization attempts to converge on one "optimal" answer, the Sensitivity Study tool is great for investigating an n-dimensional parameter space and extracting useful data across that region.
Of course, large numbers of steps and large numbers of design variables will multiply into very large numbers of updates, so you'll want to design this space carefully. But the tool is there to automate the repetition, when you're ready.
And yes, the data can be easily exported to Excel for further analysis/processing once the updates are complete.
And yes, the tool is designed to fail gracefully on "edge cases" where the model may fall into a non-robust zone. (This is a pretty common use case, actually... using the tool to "find the edges" of a robust parametric space for a template model.)
Does that help?