hexagon logo

How to loop through load cases.

I would like to know how I can loop through load cases and performs plot contour pressure then create a field assign pressure and go back to next load case and do the same operation again.
post group, group 1----create plot contour (pressure)--- current load case "n" ---- ​create a new field --- group post group 2 ---- create a load case --- apply fields onto group 2
​Repeat the process for load case n, where n =1, 2 , 3,4 etc...
​Need  help from you guys!!!
​Rgs,
​Vishal
  • Did you read my previous post under "Is it possible to dump load case id, load case name etc... in to excel using PCL function ?"
    It explains the functions used to loop thru loadcases. An example that retrieves and dumps all loadcases is attached to that post.
    For your problem, start with my example, add the calls to post groups and plot the pressure contour.
    If you plan to crate new fields, loads and load cases, do that first. Otherwise the db_get_all_ / db_get_next_ procedure won't work (because the number of loadcases is changing).
  • Hi @Vishal Kalkunte​ 
     
    following Ken's explanation and suggestion the attached example shows the looping through all loadcases and does some rudimentary(hard coded groups etc) pressure plotting and field creation. A derivation from earlier pcl post bits - it might help as you write your functions.

    Attached Files (1)