Erik Kostson
Ansys Employee
First you do not need a command snippet to convert to a link180.

It can be done natively in mechanical as follows:
Under the line body settings, and model type, one can choose link/truss instead of beam type - once that is done set that also to tension only under behaviour.

Check then axial force (beam results object) - if positive it is in tension (an the other way around for compression).
All the best