{"id":157964,"date":"2022-06-06T09:58:11","date_gmt":"2022-06-06T09:58:11","guid":{"rendered":"\/knowledge\/forums\/topic\/how-can-i-use-a-do-loop-to-apply-several-named-tabular-loads-in-mechanical-apdl\/"},"modified":"2022-06-06T09:58:11","modified_gmt":"2022-06-06T09:58:11","slug":"how-can-i-use-a-do-loop-to-apply-several-named-tabular-loads-in-mechanical-apdl","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-can-i-use-a-do-loop-to-apply-several-named-tabular-loads-in-mechanical-apdl\/","title":{"rendered":"How can I use a *DO loop to apply several named tabular loads in Mechanical APDL?"},"content":{"rendered":"<p>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 &#8216;all&#8217; or a number such as &#8217;24&#8217;.<\/p>\n<p>*dim,str,string,80<br \/>*do,jj,1,100<br \/>!<br \/>*stat,jj<br \/>!<br \/>str(1)=&#8217;sfa,&#8217;<br \/>str(1)=strcat(str(1),&#8217;area_num&#8217;)<br \/>str(1)=strcat(str(1),&#8217;,&#8217;)<br \/>str(1)=strcat(str(1),&#8217;1,pres,%uplift&#8217;)<br \/>str(1)=strcat(str(1),chrval(jj))<br \/>str(1)=strcat(str(1),&#8217;%&#8217;)<br \/>*cfopen,cmds,inp<br \/>*vwrite,str(1)<br \/>%S<br \/>*cfclose<br \/>!\/input,cmds,inp<br \/>*list,cmds,inp<br \/>!<br \/>!<br \/>!<br \/>*enddo<\/p>\n","protected":false},"template":"","class_list":["post-157964","topic","type-topic","status-publish","hentry","topic-tag-apdl","topic-tag-do-loop","topic-tag-script","topic-tag-tabular-load"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["06-06-2022 20:20"],"_bbp_forum_id":["27789"],"_btv_view_count":["1829"],"_bbp_likes_count":["0"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/157964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/157964\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=157964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}