


{"id":163750,"date":"2021-11-05T09:32:41","date_gmt":"2021-11-05T09:32:41","guid":{"rendered":"\/forum\/forums\/topic\/how-to-read-values-from-an-external-txt-file-into-an-array-in-apdl\/"},"modified":"2021-11-09T11:30:06","modified_gmt":"2021-11-09T11:30:06","slug":"how-to-read-values-from-an-external-txt-file-into-an-array-in-apdl","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-read-values-from-an-external-txt-file-into-an-array-in-apdl\/","title":{"rendered":"How to read values from an external .txt file into an ARRAY in APDL ?"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>I had a text file with values as below<\/p>\n<p>59, -65, 5, 5, 0, -65, 85, 90, -30, -30, -30, 60, -70, 10, 40, 40, 40, 45, 80, 80, 80, 85, 0<\/p>\n<p>67, 5, -65, 0, -65, 90, -90, -50, -50, -50, -45, 20, -70, 0, -5, -10, -90, -90, -5, 85, 85, 0, -65<\/p>\n<p>71, 15, -65, -30, -30, -30, -30, -30, -35, -35, -35, 0, -65, 30, -70, -10, -10, -10, 65, -65, -65, 0, 50<\/p>\n<p>How should I read these values into an<strong> array<\/strong> in APDL ?<\/p>\n<p><\/p>\n<\/p>\n<p>I tried using *vread but I am getting error.<\/p>\n<p><\/p>\n<\/p>\n<p><strong>\/INQUIRE,rows,LINES,&#039;file&#039;,&#039;txt&#039;<\/strong><\/p>\n<p><strong>*DIM,arr_data,ARRAY,rows,23<\/strong><\/p>\n<p><\/p>\n<\/p>\n<p><strong>*VREAD,arr_data,&#039;file&#039;,&#039;txt&#039;,&#039; &#039;,jik,23,rows,1,0<\/strong><\/p>\n<p><\/p>\n<\/p>\n<p><strong>I am getting fallowing warning<\/strong><\/p>\n<p>In the graphical user interface, the VREAD command can only be executed <\/p>\n<p>&nbsp;from an external file such as \/INPUT or *USE.&nbsp;The command is ignored.<\/p>\n<p><\/p>\n<\/p>\n<p>Please can anyone share working code to read the above external data into an array in APDL ?<\/p>\n","protected":false},"template":"","class_list":["post-163750","topic","type-topic","status-closed","hentry","topic-tag-array","topic-tag-importdata-1","topic-tag-mechanical-apdl","topic-tag-s-parameter-matrix-1","topic-tag-vread-2"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["7495"],"_bbp_likes_count":["0"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["163750"],"_bbp_forum_id":["27790"],"_bbp_engagement":["25","1167"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["196987"],"_bbp_last_active_id":["196987"],"_bbp_last_active_time":["2021-11-09 11:30:06"]},"test":"phanicmsfgmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/163750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/163750\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=163750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}