CENTROID

I have 11 elements after meshing and I need the location of centroid of each element in a list so that I can use it again.
The code that I am using is
*DIM, CENT_X, ARRAY, 11
*DIM, CENT_Y, ARRAY, 11
*DO, I, 1, 11
*GET, XE, ELEM, I, CENT, X
*GET, YE, ELEM, I, CENT, Y
CENT_X(I) = XE
CENT_Y(I) = YE
*ENDDO
Can someone tell me where I am going wrong?

Answers

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 183
    5 Answers 100 Comments Photogenic Name Dropper
    admin

    @Swamy please tag your post with the products/scripting tool you are using. The developers and ACE team members look for the tags to offer help on a question in their area.

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 327
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭

    Your script looks good. What is not working? What does it say in the output?