Skip to content

Instantly share code, notes, and snippets.

@shkiefer
Created June 24, 2020 06:27
Show Gist options
  • Save shkiefer/0075dacc9461159cf26f27edf0ce01da to your computer and use it in GitHub Desktop.
Save shkiefer/0075dacc9461159cf26f27edf0ce01da to your computer and use it in GitHub Desktop.
Get coordinate system location and angles
ALLSEL
! define coordinate system to calculate mass properties about, my_cs is an 'apdl_name' or specific cs ID (integer)
cs_mass = my_cs
finish
! change filename to write output to mass.out to not overwrite default file.out
/filname, mass
fini
/prep7
! get cs location and angles
*GET,cs_x,CDSY,%cs_mass%,LOC,X
*GET,cs_y,CDSY,%cs_mass%,LOC,Y
*GET,cs_z,CDSY,%cs_mass%,LOC,Z
*GET,cs_xy,CDSY,%cs_mass%,ANG,XY
*GET,cs_yz,CDSY,%cs_mass%,ANG,YZ
*GET,cs_zx,CDSY,%cs_mass%,ANG,ZX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment