Hello! I would like Patran to automaticaly adjust FEM viewing (by rotation and view fit) to show max Von Mises. Is there already PCL function which does the job?
If you are creating the plots with your own PCL then you have (or could get) the 5 result_ids that define the result being plotted. Given the result_ids you can call the res_utl_extract_nodal_results2 (or …_elem_.. ) function which has return arguments for the minloc and maxloc, which can be used to find the relevant IDs from the ids array.
So knowing the max value is at a particular node (elem) you could tap into the shareware “Local View” utility (Utilities/view/Local View) as follows:
If "node 18" was the node with the max value you can call:
ui_exec_function("ajh_view_local","init")
ajh_view_local.get_current_view()
ajh_view_local.point("Node 18")
ajh_view_local.apply_transforms()
for an "element 20" the corresponding calls would be:
ui_exec_function("ajh_view_local","init")
ajh_view_local.get_current_view()
ajh_view_local.element("Element 20")
ajh_view_local.apply_transforms()
in these examples I have hard coded the string argument for Node18 and Element 20.
Sequence of calls is to:
1 initialize ajh_view_local
2 get current view settings
3 specify the object to create a new local view coordinate system, use your node/element with max value
4 shift the object to screen centre and set rotation about this object
Then optionally you might want to orientate the view using the “local view” coordinate system