If you mean to find the rotation of i-part and the j-part with respect to the global reference frame, you could create a function measure that computes the rotation with respect to this reference frame:
AZ(i)
Please also look into YAW(), PITCH() and ROLL() too. The Adams Solver docs is very helpful in understanding these functions.
If you mean to find the rotation of i-part and the j-part with respect to one another, you can use the same function (i.e. AZ(i,j,k)) and swap the i- and j-markers, which will just result in the same angle with opposite signs.
Please let me know if this does not answer your question.