


{"id":48899,"date":"2020-10-12T10:05:34","date_gmt":"2020-10-12T10:05:34","guid":{"rendered":"\/forum\/forums\/topic\/error-in-using-the-tread-command\/"},"modified":"2020-10-12T10:05:34","modified_gmt":"2020-10-12T10:05:34","slug":"error-in-using-the-tread-command","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/error-in-using-the-tread-command\/","title":{"rendered":"error in using the TREAD command"},"content":{"rendered":"<p>Hi,nI am trying to apply a sinusoidal voltage on a surface (name of the surface is pos) of a piezoelectric layer.  I create a table (2 columns: time vs voltage) in excel and I save it as  CSV file. Then I found an example <a href=https:\/\/www.simutechgroup.com\/tips-and-tricks\/fea-articles\/227-using-tread-in-ansys-mechanical-apdl-to-read-external-data target=blank>https:\/\/www.simutechgroup.com\/tips-and-tricks\/fea-articles\/227-using-tread-in-ansys-mechanical-apdl-to-read-external-data<\/a>) on the use of TREAD command in oder to read csv file in ansys mechanical.nnto_skip=0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0! enter number of lines to skip&#8211;NONE in this examplen\/INQUIRE,numlines,LINES,data_example,csvnto_read=numlines-to_skipn!n*DEL,mytable,,NOPRn*DIM,mytable,TABLE,to_read\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0! table array to hold datan*TREAD,mytable,data_example,csv,,to_skipn! Apply time varying voltagend,pos,volt,%mytable%nnI adapt this script to my purpose: data_example is substituted with my file&#8217;s name and I want that the first line of the table is skipped so I write to_skip=1. I get an error TREAD cannot read the csv file. But I don&#8217;t know where the error is. Any help?n(I am using ansys 19.1, and this is a transient structural analysis)n<\/p>\n","protected":false},"template":"","class_list":["post-48899","topic","type-topic","status-closed","hentry","topic-tag-mechanical","topic-tag-mechanical-apdl","topic-tag-voltage"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["21125"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":["??8h"],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["1797"],"_bbp_subscription":["252012"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["48899"],"_bbp_forum_id":["27791"],"_bbp_engagement":["81","177875"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["130078"],"_bbp_last_active_id":["130078"],"_bbp_last_active_time":["2020-10-16 09:54:11"]},"test":"luigi0"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/48899","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\/48899\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=48899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}