We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Use a do loop to apply several named tabular loads

    • pgl
      Ansys Employee

      How can I use a do loop to apply several named tabular loads?

    • cbhavsar
      Ansys Employee

      Below is a script demonstrating the technique to use table parameters having names ending with a sequential value within a do loop. For testing I just list the file contents so you would insert the *dim prior to your do loop and then the do loop contents of my file (after the *do up to the *enddo) into your do loop. Then uncomment the /input. The second line that starts with str(1) is set up so that you can easily change it to 'all' or a number such as '24'. *dim,str,string,80 *do,jj,1,100 ! *stat,jj ! str(1)='sfa,' str(1)=strcat(str(1),'area_num') str(1)=strcat(str(1),',') str(1)=strcat(str(1),'1,pres,%uplift') str(1)=strcat(str(1),chrval(jj)) str(1)=strcat(str(1),'%') *cfopen,cmds,inp *vwrite,str(1) %S *cfclose !/input,cmds,inp *list,cmds,inp ! ! ! *enddo

Viewing 1 reply thread
  • The topic ‘Use a do loop to apply several named tabular loads’ is closed to new replies.