


{"id":48584,"date":"2020-10-01T13:48:16","date_gmt":"2020-10-01T13:48:16","guid":{"rendered":"\/forum\/forums\/topic\/problem-with-getting-list-of-all-nodes-in-element\/"},"modified":"2020-10-01T13:48:16","modified_gmt":"2020-10-01T13:48:16","slug":"problem-with-getting-list-of-all-nodes-in-element","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/problem-with-getting-list-of-all-nodes-in-element\/","title":{"rendered":"Problem with getting list of all nodes in element"},"content":{"rendered":"<p>Hi all,nI&#8217;m trying to create a list of all elements, their center coordinate and the included nodes in an APDL input file script. I now have the following, but I&#8217;m getting an error:n\/post1n*dim,_data_elem,table,_nrElem,14 ! Initialize a table to store the datan*vget,ELEMLIST,ELEM,ALL,ELISTnn! Loop over all elements to extract datan*do,n,1,_nrElem,1n   *get,_data_elem(n,1),ELEM,ELEMLIST(n),CENT,Xn   *get,_data_elem(n,2),ELEM,ELEMLIST(n),CENT,Yn   *get,_data_elem(n,3),ELEM,ELEMLIST(n),CENT,Znn   esel,s,,,ELEMLIST(n)n   nsle,alln   *get,_nrNodesInElem,NODE,0,count ! Get the total number of nodes in elementn   *vget,NodesInElem,NODE,ALL,NLIST ! Get node list of selected elementn   *do,nNE,1,_nrNodesInElemn    cnum = 3+nNE n    *SET,_data_elem(n,cnum),(NodesInElem(nNE))n   *end don*end donnHowever, I&#8217;m getting the following errors:n *** ERROR ***              CP =    5.328  TIME= 15:13:56n Subscript range error. Parameter NODESINELEM is dimensioned as 3, but location 4 is being requested                                                           nn *** ERROR ***              CP =    5.328  TIME= 15:13:56n No data exists for dimensioned parameter NODESINELEM with subscript 4.nnApparently the _nrNodesInElem variable says there are 4 nodes in the element, but the list of nodes only contains 3. Anybody an idea what I&#8217;m doing wrong?.Thanks, Koenn<\/p>\n","protected":false},"template":"","class_list":["post-48584","topic","type-topic","status-closed","hentry","topic-tag-mechanical-apdl","topic-tag-post-processing"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["20808"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":["?}'"],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["2111"],"_bbp_subscription":["254139"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["48584"],"_bbp_forum_id":["27791"],"_bbp_engagement":["180031"],"_bbp_voice_count":["1"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["128706"],"_bbp_last_active_id":["128706"],"_bbp_last_active_time":["2020-10-02 08:48:52"]},"test":"koen_franse"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/48584","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\/48584\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=48584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}