General Mechanical

General Mechanical

Find length of array

    • Koen_Franse
      Subscriber
      Hi,nMaybe a really easy question, but I can't find it anywhere on the internet. How do you find the length of an array in APDL? For example, I've got this:n*vget,NodesInElem,NODE,ALL,NLIST ! Get node list of selected elementnand want to know the length of NodesInElem.nThanksn
    • Daniel Shaw
      Ansys Employee
      Try the *STATUS commandn
    • Koen_Franse
      Subscriber
      Hi Daniel,nThanks for your answer. I had a look at the documentation of *STATUS but I don't see how I can obtain a parameter with the length of NodesInElem with this. Can you explain this further?n
    • Erik Kostson
      Ansys Employee
      Also one way is to get the number of nodes selected , and that will be the size of the array so say:nNSEL,S,LOC,X,0n*GET, NumNodesSelect, NODE, 0, COUNT, , , ! Gets the number of nodes selected, and that will be the size of the arraynnThank younnErikn
    • Erik Kostson
      Ansys Employee
      You can also try this *get command (see help for more info on that):nn*GET, ArrSize, PARM, NodesInElem, DIM, XnnThank youn
Viewing 4 reply threads
  • You must be logged in to reply to this topic.